Deprecated module md5 with python 2.6

Bug #340757 reported by Marco Rodrigues
6
Affects Status Importance Assigned to Milestone
python-support (Debian)
Fix Released
Unknown
python-support (Ubuntu)
Fix Released
High
Unassigned
Jaunty
Fix Released
High
Unassigned

Bug Description

Binary package hint: python-support

Easy one to fix...

/usr/bin/pysupport-movemodules:8: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import os,os.path,md5,re,sys

Tags: python2.6
Revision history for this message
Adam Conrad (adconrad) wrote :

This is no longer throwing warnings on builds, but rather throwing errors and causing cascading build failures in jaunty-autotest:

   dh_pysupport -v
 pysupport-movemodules debian/libaa1-dev
/usr/bin/pysupport-movemodules:8: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import os,os.path,md5,re,sys
Traceback (most recent call last):
  File "/usr/bin/pysupport-movemodules", line 8, in <module>
    import os,os.path,md5,re,sys
  File "/usr/lib/python2.6/md5.py", line 10, in <module>
    from hashlib import md5
  File "/usr/lib/python2.6/hashlib.py", line 136, in <module>
    md5 = __get_builtin_constructor('md5')
  File "/usr/lib/python2.6/hashlib.py", line 63, in __get_builtin_constructor
    import _md5
ImportError: No module named _md5
dh_pysupport: command returned error code 256
make: *** [install] Error 1

This needs to be sorted out ASAP in either python-support or python2.6, I'd guess, if we want to be able to rebuild anything that build-depends on python-support after the release. :/

Changed in python-support (Ubuntu):
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
Adam Conrad (adconrad) wrote :

The traceback looks like python's trying to import some backward-compat code and failing miserably, so maybe the critically urgent fix belongs to python here, rather than python-support.

Revision history for this message
Adam Conrad (adconrad) wrote :

Nevermind the severity inflation. The build logs where I saw the error look to be a case of "the package was partially removed, and python2.6 was no longer installed, but a less-than-clever debian/rules file conditionally calls dh_pysupport if the binary exists", hence the spectacular explosion.

Changed in python-support (Ubuntu Jaunty):
importance: Critical → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-support - 0.8.7ubuntu3

---------------
python-support (0.8.7ubuntu3) jaunty; urgency=low

  * use hashlib instead of the md5 module (LP: #340757)
  * depend on python2.5 (because of hashlib)

 -- Michael Vogt <email address hidden> Wed, 08 Apr 2009 22:17:49 +0200

Changed in python-support (Ubuntu Jaunty):
status: Confirmed → Fix Released
Revision history for this message
Kyle Ambroff (kambroff) wrote :

I'm going to reopen this, since the fix in 0.8.7 is not correct. The attached one-liner patch will correct the problem.

Changed in python-support (Ubuntu Jaunty):
status: Fix Released → Confirmed
Revision history for this message
Steve Langasek (vorlon) wrote :

This causes build failures for all packages using dh_pysupport, so raising to high.

I've uploaded the fix, waiting for another release team member to review.

Changed in python-support (Ubuntu Jaunty):
importance: Low → High
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-support - 0.8.7ubuntu4

---------------
python-support (0.8.7ubuntu4) jaunty; urgency=low

  * Fix invocation of hashlib md5 in pysupport-movemodules; thanks to
    Kyle Ambroff <email address hidden> for the fix. LP: #340757.

 -- Steve Langasek <email address hidden> Fri, 10 Apr 2009 01:36:33 +0000

Changed in python-support (Ubuntu Jaunty):
status: Fix Committed → Fix Released
Changed in python-support (Debian):
status: Unknown → Fix Released
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.