Opened 6 years ago

Closed 6 years ago

#7836 closed defect (fixed)

SHA module deprecated warning fix

Reported by: anonymous Owned by: Kamil Kisiel
Priority: normal Component: TracMathPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12



Enclosed you will find a fix for the SHA deprecated warning.

--- (revision 248)
+++ (revision 249)
@@ -5,7 +5,7 @@
 import codecs
 import re
-import sha
+import hashlib 
 from cStringIO import StringIO
 import os
 import sys
@@ -142,7 +142,7 @@
             if m:
                 label =
-        key ='utf-8')).hexdigest()
+        key = hashlib.sha1(content.encode('utf-8')).hexdigest()
         imgname = key + '.png'
         imgpath = os.path.join(self.cacheDirectory, imgname)



Attachments (0)

Change History (2)

comment:1 Changed 6 years ago by Kamil Kisiel

Owner: changed from rlotun to Kamil Kisiel
Status: newassigned

comment:2 Changed 6 years ago by Kamil Kisiel

Resolution: fixed
Status: assignedclosed

This is fixed in the 0.3 release.

Modify Ticket

as closed The owner will remain Kamil Kisiel.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.