Deprecation warning for md5 and sha modules with Python 2.6

Bug #342170 reported by Joseph Wakeling
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Fix Committed
Undecided
Bob Tanner
Python-Crypto
Fix Committed
Undecided
Bob Tanner
subvertpy
New
Undecided
Unassigned

Bug Description

I'm running bzr 1.12 on Kubuntu Jaunty with Python 2.6.1. bzr is generating continuous error messages with deprecation warnings regarding the sha and md5 modules:

-----------------------------------------
/usr/lib/python2.6/dist-packages/subvertpy/delta.py:21: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
/usr/lib/python2.6/dist-packages/Crypto/Hash/SHA.py:6: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
  from sha import *
-----------------------------------------

These occur continually during use, even when hitting <TAB> to autocomplete commands. This latter appearance has a very unpleasant effect on usability. :-(

These deprecation warnings are mentioned in bug 269535 but this is a different problem -- not a failure of bzr, but simply continual and annoying error messages about these deprecated modules.

Revision history for this message
John A Meinel (jameinel) wrote :

just to mention that the former message is generated by bzr-svn, and the latter is generated by python-crypto. Certainly something needs to be done (although perhaps the quick fix is disabiling bzr auto-completion?)

I'll try to mark the relevant other projects, as they may have already fixed things.

Revision history for this message
Bob Tanner (tanner) wrote :

The bug in python-crypto is track here: https://bugs.launchpad.net/pycrypto/+bug/269429

Upstream dev released 2 patches (I'll attach here as well):

Fixed in commit-id d2311689910240e425741a546576129f4c9735e2 in the git repository.

http://gitweb.pycrypto.org/?p=crypto/pycrypto-2.0.x.git;a=commitdiff;h=d2311689910240e425741a546576129f4c9735e2
http://gitweb.pycrypto.org/?p=crypto/pycrypto-2.0.x.git;a=commitdiff;h=84b793416b52311643bfd456a4544444afbfb5da

Revision history for this message
Martin Albisetti (beuno) wrote :

Same here:

/usr/lib/python2.6/dist-packages/Crypto/Hash/SHA.py:6: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
  from sha import *
/usr/lib/python2.6/dist-packages/Crypto/Hash/MD5.py:6: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  from md5 import *

Does this mean that we need to get the package updated in Jaunty ASAP?

Bob Tanner (tanner)
Changed in pycrypto:
status: New → Confirmed
Revision history for this message
Bob Tanner (tanner) wrote :

Stepping up to the plate to get git-upstream fixes into something the Ubuntu people can work with -and- help reduce the chatter on bzr's bug reports about the deprecated warnings.

Changed in pycrypto:
assignee: nobody → tanner
status: Confirmed → Fix Committed
Revision history for this message
Bob Tanner (tanner) wrote :

Martin, you should be able to merge lp:~tanner/pycrypto/bug-fix-342170 into Jaunty's package and get a deprecation free pycrypto page. Let me know where I can help.

Changed in bzr:
assignee: nobody → tanner
milestone: none → 1.14rc1
status: New → Fix Committed
Revision history for this message
Joseph Wakeling (webdrake) wrote :

Thanks to everyone for their fast action on this one.

The subvertpy part of this bug is a duplicate of bug 323270, for which there is apparently also a fix released. I would mark this but don't know how to add more than one duplicate. Sorry for not spotting the problems' double origins myself.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.