- Add patch to hashlib instead of deprecated md5 and sha modules (#484473)

f38
Stewart Adam 16 years ago
parent d02da07f67
commit f7ff1fe014

@ -0,0 +1,33 @@
--- HMAC.py.old 2009-02-07 09:08:31.000000000 -0500
+++ HMAC.py 2009-02-07 09:09:08.000000000 -0500
@@ -33,7 +33,7 @@
digestmod: A module supporting PEP 247. Defaults to the md5 module.
"""
if digestmod == None:
- import md5
+ from hashlib import md5
digestmod = md5
self.digestmod = digestmod
--- MD5.py.old 2009-02-07 09:08:22.000000000 -0500
+++ MD5.py 2009-02-07 09:09:22.000000000 -0500
@@ -3,7 +3,7 @@
__revision__ = "$Id: MD5.py,v 1.4 2002/07/11 14:31:19 akuchling Exp $"
-from md5 import *
+from hashlib import md5
import md5
if hasattr(md5, 'digestsize'):
--- SHA.py.old 2009-02-07 09:08:38.000000000 -0500
+++ SHA.py 2009-02-07 09:09:32.000000000 -0500
@@ -3,7 +3,7 @@
__revision__ = "$Id: SHA.py,v 1.4 2002/07/11 14:31:19 akuchling Exp $"
-from sha import *
+from hashlib import sha
import sha
if hasattr(sha, 'digestsize'):
digest_size = digestsize

@ -4,9 +4,10 @@
Summary: Cryptography library for Python Summary: Cryptography library for Python
Name: python-crypto Name: python-crypto
Version: 2.0.1 Version: 2.0.1
Release: 14.1 Release: 15
License: Public Domain License: Public Domain
Group: Development/Libraries Group: Development/Libraries
# FIXME: In the near future, new releases will be at http://www.dlitz.net/software/pycrypto/
URL: http://www.amk.ca/python/code/crypto.html URL: http://www.amk.ca/python/code/crypto.html
Source: http://www.amk.ca/files/python/crypto/pycrypto-2.0.1.tar.gz Source: http://www.amk.ca/files/python/crypto/pycrypto-2.0.1.tar.gz
Provides: pycrypto = %{version}-%{release} Provides: pycrypto = %{version}-%{release}
@ -62,6 +63,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Sat Feb 7 2009 Stewart Adam <s.adam at diffingo.com> - 2.0.1-15
- Add patch to hashlib instead of deprecated md5 and sha modules (#484473)
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.0.1-14.1 * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.0.1-14.1
- Rebuild for Python 2.6 - Rebuild for Python 2.6

Loading…
Cancel
Save