Package: python-pyrex
Version: 0.9.8.5-2
Severity: wishlist
Tags: patch

When using python-pyrex with python2.6 it gives this warning: 
/usr/lib/python2.6/dist-packages/Pyrex/Compiler/Scanning.py:39: 
DeprecationWarni ng: the md5 module is deprecated; use hashlib instead import 
md5

Reading the Scanning.py and about the hashlib superseding md5 I found that this 
can be fixed changing only two lines (also I think is solved in upstream Pyrex 
0 .9.9)

This also as been reported to Ubuntu and can be found in: 
https://bugs.launchpad.net/ubuntu/+source/pyrex/+bug/640062

vicm3@mini:/usr/lib/python2.6/dist-packages/Pyrex/Compiler$ diff 
Scanning.py.orig Scanning.py -u
--- Scanning.py.orig    2011-01-14 05:58:10.000000000 +0000
+++ Scanning.py 2011-01-18 06:07:15.000000000 +0000
@@ -36,7 +36,7 @@
     # Try to calculate a hash code for the given source file.
     # Returns an empty string if the file cannot be accessed.
     #print "Hashing", path ###
-    import md5
+    import hashlib
     try:
         try:
             f = open(path, "rU")
@@ -52,7 +52,7 @@
     # tabs by a single space.
     import re
     text = re.sub("[ \t]+", " ", text)
-    hash = md5.new(text).hexdigest()
+    hash = hashlib.md5(text).hexdigest()
     return hash

 def open_pickled_lexicon(expected_hash):



-- System Information:
Debian Release: 6.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-bpo.5-686-bigmem
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-pyrex depends on:
ii  python                  2.6.6-3+squeeze5 interactive high-level object-orie
ii  python-central          0.6.16+nmu1      register and build utility for Pyt

Versions of packages python-pyrex recommends:
ii  python-all-dev          2.6.6-3+squeeze5 package depending on all supported

python-pyrex suggests no packages.

-- no debconf information




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to