python deprecation warnings for md5 and sha

Bug #610570 reported by Fabien Tassin
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-pysnmp4 (Ubuntu)
Fix Released
Low
Unassigned
Lucid
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: python-pysnmp4

python-pysnmp4 shows some Deprecation Warnings for md5 and sha.

Also, since that version landed (early 2009), cdbs changed and the package is no longer installable because $(cdbs_python_support_path) is no longer defined (since cdbs 0.4.56, and lucid has 0.4.62)

TEST CASE: see comment 4. Pasting that import line in a python shell should return without any output instead of the deprecation warnings.
Also, a rebuild of the untouched source package is not installable because of the duplicated pysnmp/__init__.py file, which the debdiff also fixes.

Revision history for this message
Fabien Tassin (fta) wrote :

here is a debdiff for lucid-proposed. Should I upload it myself?

Revision history for this message
Fabien Tassin (fta) wrote :

before:

>>> from pysnmp.entity.rfc3413.oneliner import cmdgen
/usr/lib/pymodules/python2.6/pysnmp/v4/proto/secmod/rfc3414/auth/hmacmd5.py:1: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import string, md5
/usr/lib/pymodules/python2.6/pysnmp/v4/proto/secmod/rfc3414/auth/hmacsha.py:1: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
  import string, sha
>>>

and for the rebuild issue (without the 2nd fix):

Preparing to replace python-pysnmp-common 4.1.9a-1 (using .../python-pysnmp-common_4.1.9a-1+rebuild_all.deb) ...
Unpacking replacement python-pysnmp-common ...
Preparing to replace python-pysnmp4 4.1.9a-1 (using .../python-pysnmp4_4.1.9a-1+rebuild_all.deb) ...
Unpacking replacement python-pysnmp4 ...
dpkg: error processing /var/cache/apt/archives/python-pysnmp4_4.1.9a-1+rebuild_all.deb (--unpack):
 trying to overwrite '/usr/share/pyshared/pysnmp/__init__.py', which is also in package python-pysnmp-common 0:4.1.9a-1+rebuild
dpkg-deb: subprocess paste killed by signal (Broken pipe)

$ dpkg -c /var/cache/apt/archives/python-pysnmp4_4.1.9a-1+rebuild_all.deb | grep pysnmp/__init__.py
-rw-r--r-- root/root 844 2006-12-13 21:23 ./usr/share/pyshared/pysnmp/__init__.py
$ dpkg -c /var/cache/apt/archives/python-pysnmp-common_4.1.9a-1+rebuild_all.deb | grep pysnmp/__init__.py
-rw-r--r-- root/root 844 2006-12-13 21:23 ./usr/share/pyshared/pysnmp/__init__.py

after, both issues are fixed

Changed in python-pysnmp4 (Ubuntu):
assignee: Fabien Tassin (fta) → nobody
Revision history for this message
Fabien Tassin (fta) wrote :

the fix is also needed in maverick (it's the exact same version). uploading..

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-pysnmp4 - 4.1.9a-1ubuntu1

---------------
python-pysnmp4 (4.1.9a-1ubuntu1) maverick; urgency=low

  * debian/control, debian/rules:
    + add quilt so we have a patch system
  * debian/patches/01-fix-py-deprecation-warnings.patch,
    debian/patches/series
    + fix the python Deprecation Warnings for md5 and sha (LP: #610570)
  * debian/rules:
    + remove $(cdbs_python_support_path), it's no longer defined (since cdbs
      0.4.56) and makes the package uninstallable because of duplicated files
 -- Fabien Tassin <email address hidden> Mon, 26 Jul 2010 08:10:47 +0200

Changed in python-pysnmp4 (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Jonathan Riddell (jr) wrote :

Why is this a SRU critical issue?

Needs a test case

Needs approval from ubuntu-sru

Fabien Tassin (fta)
description: updated
Revision history for this message
Martin Jackson (mhjacks) wrote :

I believe this fix makes the package uninstallable in Maverick at least. Can you please look at #612317?

Thanks

Revision history for this message
Martin Jackson (mhjacks) wrote :

Sorry, that's (LP: #612317)

Revision history for this message
Fabien Tassin (fta) wrote :

hmm, weird. it worked locally. I'll investigate. Thanks for the hint.

please, hold off the lucid update then.

Revision history for this message
Fabien Tassin (fta) wrote :

ok, i see. it worked fine on lucid (so the debdiff i just removed was good enough for lucid) but not on maverick where the pyshared directory is populated much later (after binary-install). As the version was the same, i assumed the same fix would work on maverick, but obviously it didn't.

I moved the rule to binary-post-install to accommodate both lucid and maverick with the same fix.
I'm about to upload an update to maverick.
I'll re-attach a debdiff and repost to lucid-proposed shortly afterwards.

Revision history for this message
Fabien Tassin (fta) wrote :

This bug was fixed in the package python-pysnmp4 - 4.1.9a-1ubuntu2

---------------
python-pysnmp4 (4.1.9a-1ubuntu2) maverick; urgency=low

  * debian/rules:
    + move the __init__.py removal to the binary-post-install target
      as it needs to be done after pyshared is populated which is now
      after binary-install (LP: #610570, #612317)

 -- Fabien Tassin <email address hidden> Wed, 04 Aug 2010 20:08:12 +0200

Revision history for this message
Fabien Tassin (fta) wrote :
Revision history for this message
Fabien Tassin (fta) wrote :

just re-uploaded to lucid-proposed after being successfully tested in my sandbox ppa.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted python-pysnmp4 into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in python-pysnmp4 (Ubuntu Lucid):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Martin Jackson (mhjacks) wrote :

Verified:

mjackson@anduril ~ % dpkg -l | grep pysnmp4
ii python-pysnmp4 4.1.9a-1ubuntu0.10.04.1 Python SNMP library for agents and managers
ii python-pysnmp4-apps 0.2.6a-1 Applications for the Python SNMP library
ii python-pysnmp4-mibs 0.0.5a-3 MIBs for the Python SNMP library
mjackson@anduril ~ % python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pysnmp.entity.rfc3413.oneliner import cmdgen
>>>

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-pysnmp4 - 4.1.9a-1ubuntu0.10.04.1

---------------
python-pysnmp4 (4.1.9a-1ubuntu0.10.04.1) lucid-proposed; urgency=low

  * debian/control, debian/rules:
    + add quilt so we have a patch system
  * debian/patches/01-fix-py-deprecation-warnings.patch,
    debian/patches/series
    + fix the python Deprecation Warnings for md5 and sha (LP: #610570)
  * debian/rules:
    + remove $(cdbs_python_support_path), it's no longer defined (since cdbs
      0.4.56) and makes the package uninstallable because of duplicated files
 -- Fabien Tassin <email address hidden> Mon, 26 Jul 2010 08:10:47 +0200

Changed in python-pysnmp4 (Ubuntu Lucid):
status: Fix Committed → Fix Released
tags: added: testcase
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.