Red Hat Bugzilla – Bug 480945
[PATCH] Use hashlib instead of deprecated module 'md5'
Last modified: 2009-09-25 16:15:01 EDT
Description of problem:
The problem looks same as bz#475871.
Cheetah uses deprecated module 'md5' and thus DeprecationWarning warning message will be printed. Here is an example log:
foo@localhost% echo "from Cheetah import CacheRegion" | python - ~
/usr/lib/python2.6/site-packages/Cheetah/CacheRegion.py:30: DeprecationWarning: the md5 module is deprecated; use hashlib instead
Version-Release number of selected component (if applicable):
How reproducible: always if Cheetah.CacheRegion is imported
Steps to Reproduce:
try 'echo "from Cheetah import CacheRegion" | python -'
Actual results: See the log above.
Expected results: no warning message
Created attachment 329608 [details]
Patch to make use of hashlib instead of md5 module
It might depend on python >= 2.6.
This is really a change that would need to be made upstream. Also, in order to support older versions of python I think you'd have to fall back to md5 if hashlib isn't available. You probably want to post a patch to
(In reply to comment #2)
> This is really a change that would need to be made upstream. Also, in order to
> support older versions of python I think you'd have to fall back to md5 if
> hashlib isn't available. You probably want to post a patch to
Absolutely right. I just took second best :P
I posted an updated patch to that list. thanks for letting me know that list!
Also, I will attach that patch here for the record.
Created attachment 330020 [details]
Updated patch posted to the upstream mailing list
*** Bug 485445 has been marked as a duplicate of this bug. ***
"Cheetah Community Edition v2.1.0" looks including my fix.
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.
More information and reason for this action is here:
There are already builds for 2.2.1
This update (f11) has been submitted for stable
I guess this one could be closed. How about f10, it still appears to have 2.0.1.
Thanks very much, was hoping I didn't have to monkey-patch this warning out :)
Fedora 11 still seems to be broken.
I had prepared an update for F11 but it got as much negative karma as positive, so I didn't push it.
I'm waiting for version 2.2.2 (should be out in a couple weeks) and hoping for better luck with that one. Is this a high priority?
Dumb update system won't let me see any reviews of problems with the above. Ah well.
Not a priority, just wondering if this one slipped through.
Ping me when it's ready and I wouldn't mind helping test.
It doesn't actually show me who set the negative karma either, it just shows 3 positive and 3 negative (they didn't make a comment, either).
I'm in touch with the upstream Cheetah maintainer. The 2.2.2 release should be available in a couple weeks, tops. I'll send you a link to the build for testing when it's available. Thanks for the help!
python-cheetah-2.2.2-1.fc11 has been submitted as an update for Fedora 11.
Packages for the 2.2.2 release are available here:
Please test them and let me know if there are any problems. You can comment and add/remove karma here:
In particular, please look for any unicode/utf-8 related problems, since handling of encoding issues has changed considerably since 2.0.1.
Note that this version no longer bundles the Markdown module. If you're using the Markdown transform/filter, you'll need to install a copy locally. python-markdown is not available in F-11, but is available in F-12 (and python-cheetah adds a dependency on it in F-12).
python-cheetah-2.2.2-1.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
su -c 'yum --enablerepo=updates-testing update python-cheetah'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-9661
python-cheetah-2.2.2-1.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.