diff options
author | David Cournapeau <cournape@gmail.com> | 2009-01-04 10:57:39 +0000 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2009-01-04 10:57:39 +0000 |
commit | 1bd6b58098c4fce234889d2709e13fff2e5ce40e (patch) | |
tree | 2ff33f70f0efbd69ee93becd5359dd75b2755707 | |
parent | f838125f961a5a3346bef9cb843aaf6188dbcb2a (diff) | |
download | numpy-1bd6b58098c4fce234889d2709e13fff2e5ce40e.tar.gz |
Do not import md5 on python >= 2.6; use hashlib instead.
-rw-r--r-- | numpy/core/code_generators/genapi.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/numpy/core/code_generators/genapi.py b/numpy/core/code_generators/genapi.py index d44286b50..eefbcc22d 100644 --- a/numpy/core/code_generators/genapi.py +++ b/numpy/core/code_generators/genapi.py @@ -6,9 +6,15 @@ See ``find_function`` for how functions should be formatted, and specified. """ import sys, os, re -import md5 import textwrap +_PY_MAJ, _PY_MIN = sys.version_info[:2] +# md5 is deprecated from python 2.6 +if _PY_MAJ == 2 and _PY_MIN < 6: + import md5 +else: + from hashlib import md5 + __docformat__ = 'restructuredtext' # The files under src/ that are scanned for API functions |