diff MoinMoin/macro/FootNote.py @ 4363:817d99d715fe

remove direct usage of deprecated sha module - use hashlib, if possible
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 03 Oct 2008 22:33:35 +0200
parents a799b224389f
children a8dec8a9071c
line wrap: on
line diff
--- a/MoinMoin/macro/FootNote.py	Fri Oct 03 21:18:49 2008 +0200
+++ b/MoinMoin/macro/FootNote.py	Fri Oct 03 22:33:35 2008 +0200
@@ -11,10 +11,9 @@
     @license: GNU GPL, see COPYING for details.
 """
 
-import sha
-
 from MoinMoin import config, wikiutil
 from MoinMoin.parser.text_moin_wiki import Parser as WikiParser
+from MoinMoin.support.python_compatibility import hash_new
 
 Dependencies = ["time"] # footnote macro cannot be cached
 
@@ -35,7 +34,7 @@
         idx = request.footnote_ctr
         request.footnote_ctr += 1
 
-        shahex = sha.new(args.encode(config.charset)).hexdigest()
+        shahex = hash_new('sha1', args.encode(config.charset)).hexdigest()
         backlink_id = "fndef-%s-%d" % (shahex, idx)
         fwdlink_id = "fnref-%s" % shahex