Opened 4 years ago

Closed 4 years ago

#7836 closed defect (fixed)

SHA module deprecated warning fix

Reported by: anonymous Owned by: kisielk
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 4 years ago by kisielk

  • Owner changed from rlotun to kisielk
  • Status changed from new to assigned

comment:2 Changed 4 years ago by kisielk

  • Resolution set to fixed
  • Status changed from assigned to closed

This is fixed in the 0.3 release.

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.