summaryrefslogtreecommitdiff
path: root/www/trac-math/files/patch-tracmath_tracmath.py
diff options
context:
space:
mode:
authorAntoine Brodin <antoine@FreeBSD.org>2021-01-01 10:11:34 +0000
committerAntoine Brodin <antoine@FreeBSD.org>2021-01-01 10:11:34 +0000
commit26b4c8f71f91d22e081b27814782686edde0c90a (patch)
tree1c321c39372c25d8634e75b5c8e08edc676b296d /www/trac-math/files/patch-tracmath_tracmath.py
parentNew port: math/py-optuna: A hyperparameter optimization framework (diff)
Revert r559792 to unbreak INDEX and bulk -a
It seems a lot of reverse dependencies were missed With hat: portmgr
Diffstat (limited to 'www/trac-math/files/patch-tracmath_tracmath.py')
-rw-r--r--www/trac-math/files/patch-tracmath_tracmath.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/www/trac-math/files/patch-tracmath_tracmath.py b/www/trac-math/files/patch-tracmath_tracmath.py
new file mode 100644
index 000000000000..f0b37da150da
--- /dev/null
+++ b/www/trac-math/files/patch-tracmath_tracmath.py
@@ -0,0 +1,21 @@
+--- tracmath/tracmath.py.orig 2008-04-04 08:58:46 UTC
++++ tracmath/tracmath.py
+@@ -4,8 +4,8 @@ This has currently been tested only on t
+ """
+
+ import codecs
++import hashlib
+ import re
+-import sha
+ from cStringIO import StringIO
+ import os
+ import sys
+@@ -142,7 +142,7 @@ class TracMathPlugin(Component):
+ if m:
+ label = m.group(1)
+
+- key = sha.new(content.encode('utf-8')).hexdigest()
++ key = hashlib.sha1(content.encode('utf-8')).hexdigest()
+
+ imgname = key + '.png'
+ imgpath = os.path.join(self.cacheDirectory, imgname)