Deprecated module md5 with python 2.6
Bug #336891 reported by
Marco Rodrigues
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SCons |
Invalid
|
High
|
|||
scons (Ubuntu) |
Invalid
|
Low
|
Unassigned |
Bug Description
Binary package hint: scons
$ cat /usr/lib/
import md5
Changed in scons: | |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in scons: | |
status: | Unknown → Confirmed |
Changed in scons: | |
status: | Confirmed → Invalid |
Changed in scons: | |
importance: | Unknown → High |
To post a comment you must log in.
Copying from the upstream bug report at scons.tigris.org:
The line of code you referenced is in a compatibility layer (SCons.compat) that
specifically wraps its import of md5 in an interface designed to mimic the
modern hashlib interface and for use only in older versions of Python. This
code is never used if the version of Python has a native hashlib module.
This is accomplished by the following snippet in scons/SCons/ compat/ __init_ _.py, which verifies that it can, in fact,
/usr/lib/
import the native hashlib module and only uses the module that imports md5 if
SCons is being run on an older version where the import fails:
try:
import_ as('_scons_ hashlib' , 'hashlib')
import hashlib
except ImportError:
# Pre-2.5 Python has no hashlib module.
try:
except ImportError:
# If we failed importing our compatibility module, it probably
# means this version of Python has no md5 module. Don't do
# anything and let the higher layer discover this fact, so it
# can fall back to using timestamp.
pass
Closing as INVALID.