Bug 480945 - [PATCH] Use hashlib instead of deprecated module 'md5'
[PATCH] Use hashlib instead of deprecated module 'md5'
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: python-cheetah (Show other bugs)
11
All Linux
low Severity low
: ---
: ---
Assigned To: Mike Bonnet
Fedora Extras Quality Assurance
:
: 485445 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-21 09:22 EST by Satoru SATOH
Modified: 2009-09-25 16:15 EDT (History)
6 users (show)

See Also:
Fixed In Version: 2.2.2-1.fc11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 507614 508837 (view as bug list)
Environment:
Last Closed: 2009-09-25 16:15:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to make use of hashlib instead of md5 module (897 bytes, patch)
2009-01-21 09:25 EST, Satoru SATOH
no flags Details | Diff
Updated patch posted to the upstream mailing list (774 bytes, patch)
2009-01-26 13:47 EST, Satoru SATOH
no flags Details | Diff

  None (edit)
Description Satoru SATOH 2009-01-21 09:22:54 EST
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
  import md5
foo@localhost%


Version-Release number of selected component (if applicable):
python-cheetah-2.0.1-4.fc11.x86_64

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


Additional info:
Comment 1 Satoru SATOH 2009-01-21 09:25:12 EST
Created attachment 329608 [details]
Patch to make use of hashlib instead of md5 module

It might depend on python >= 2.6.
Comment 2 Mike Bonnet 2009-01-21 09:51:16 EST
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

cheetahtemplate-discuss@lists.sourceforge.net
Comment 3 Satoru SATOH 2009-01-26 13:46:53 EST
(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
> 
> cheetahtemplate-discuss@lists.sourceforge.net

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.
Comment 4 Satoru SATOH 2009-01-26 13:47:48 EST
Created attachment 330020 [details]
Updated patch posted to the upstream mailing list
Comment 5 Jerry Amundson 2009-02-13 11:28:46 EST
*** Bug 485445 has been marked as a duplicate of this bug. ***
Comment 6 Satoru SATOH 2009-03-19 01:18:10 EDT
FYI. 

"Cheetah Community Edition v2.1.0" looks including my fix.
Comment 7 Bug Zapper 2009-06-09 06:49:01 EDT
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:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 8 Juha Tuomala 2009-06-30 04:09:24 EDT
http://koji.fedoraproject.org:80/koji/packageinfo?packageID=3568
 There are already builds for 2.2.1

https://admin.fedoraproject.org/updates/search/python-cheetah
 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.
Comment 9 Michael DeHaan 2009-07-02 12:08:32 EDT
Thanks very much, was hoping I didn't have to monkey-patch this warning out :)
Comment 10 Michael DeHaan 2009-08-13 11:06:49 EDT
Fedora 11 still seems to be broken.
Comment 11 Mike Bonnet 2009-08-13 11:14:24 EDT
I had prepared an update for F11 but it got as much negative karma as positive, so I didn't push it.

https://admin.fedoraproject.org/updates/F11/FEDORA-2009-5981

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?
Comment 12 Michael DeHaan 2009-08-13 11:25:23 EDT
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.  

--Michael
Comment 13 Mike Bonnet 2009-08-13 11:40:16 EDT
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!
Comment 14 Fedora Update System 2009-09-15 14:05:49 EDT
python-cheetah-2.2.2-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/python-cheetah-2.2.2-1.fc11
Comment 15 Mike Bonnet 2009-09-15 14:10:44 EDT
Packages for the 2.2.2 release are available here:

https://koji.fedoraproject.org/koji/buildinfo?buildID=132136

Please test them and let me know if there are any problems.  You can comment and add/remove karma here:

https://admin.fedoraproject.org/updates/python-cheetah-2.2.2-1.fc11

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).
Comment 16 Fedora Update System 2009-09-16 16:31:34 EDT
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
Comment 17 Fedora Update System 2009-09-25 16:14:55 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.