Applications using python-crypto may get the following warning:
/usr/lib64/python2.6/site-packages/Crypto/Hash/SHA.py:6: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
from sha import *
/usr/lib64/python2.6/site-packages/Crypto/Hash/MD5.py:6: DeprecationWarning: the md5 module is deprecated; use hashlib instead
from md5 import *
Version-Release number of selected component (if applicable):
/usr/lib64/python2.6/site-packages/Crypto/Hash/SHA.py:6: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
from sha import *
/usr/lib64/python2.6/site-packages/Crypto/Hash/MD5.py:6: DeprecationWarning: the md5 module is deprecated; use hashlib instead
from md5 import *
Expected results:
No warnings about deprecated functions.
Additional info:
From a quick grep it also applies to Crypto/Hash/HMAC.py
It seems the fix is simply changing as follows
From:
from md5 import *
import mf5
To:
from hashlib import md5
Description of problem:
Applications using python-crypto may get the following warning:
/usr/lib64/ python2. 6/site- packages/ Crypto/ Hash/SHA. py:6: DeprecationWarning: the sha module is deprecated; use the hashlib module instead python2. 6/site- packages/ Crypto/ Hash/MD5. py:6: DeprecationWarning: the md5 module is deprecated; use hashlib instead
from sha import *
/usr/lib64/
from md5 import *
Version-Release number of selected component (if applicable):
python- crypto- 2.0.1-14. 1.x86_64 2.6-4.fc11. x86_64
python-
How reproducible:
Always
Steps to Reproduce:
1.
2.
3.
Actual results:
/usr/lib64/ python2. 6/site- packages/ Crypto/ Hash/SHA. py:6: DeprecationWarning: the sha module is deprecated; use the hashlib module instead python2. 6/site- packages/ Crypto/ Hash/MD5. py:6: DeprecationWarning: the md5 module is deprecated; use hashlib instead
from sha import *
/usr/lib64/
from md5 import *
Expected results:
No warnings about deprecated functions.
Additional info:
From a quick grep it also applies to Crypto/Hash/HMAC.py
It seems the fix is simply changing as follows
From:
from md5 import *
import mf5
To:
from hashlib import md5
and similar for SHA.