diff options
| author | Charles Harris <charlesr.harris@gmail.com> | 2013-04-21 22:52:15 -0600 |
|---|---|---|
| committer | Charles Harris <charlesr.harris@gmail.com> | 2013-04-24 19:29:58 -0600 |
| commit | c92d924dd3dfa9eb97f65848e04ec9391709bc09 (patch) | |
| tree | 665040ee28bf7b5f0885b8e7b21ac82bb472c8a5 /numpy/lib | |
| parent | d0d8d1c1deb28fb2b43c7180cd0e293608b6964e (diff) | |
| download | numpy-c92d924dd3dfa9eb97f65848e04ec9391709bc09.tar.gz | |
MAINT: Remove unneeded version checks.
Now that only Python versions 2.6-2.7 and 3.2-3.3 are supported
some version checks are no longer needed. This patch removes them
so as to clean up the code.
Diffstat (limited to 'numpy/lib')
| -rw-r--r-- | numpy/lib/npyio.py | 3 | ||||
| -rw-r--r-- | numpy/lib/utils.py | 15 |
2 files changed, 5 insertions, 13 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py index b084d6af7..c13c7e94a 100644 --- a/numpy/lib/npyio.py +++ b/numpy/lib/npyio.py @@ -129,8 +129,7 @@ class BagObj(object): def zipfile_factory(*args, **kwargs): import zipfile - if sys.version_info >= (2, 5): - kwargs['allowZip64'] = True + kwargs['allowZip64'] = True return zipfile.ZipFile(*args, **kwargs) class NpzFile(object): diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py index 75ba5bca6..2519cd4d4 100644 --- a/numpy/lib/utils.py +++ b/numpy/lib/utils.py @@ -84,17 +84,10 @@ def get_numarray_include(type=None): return include_dirs + [get_include()] -if sys.version_info < (2, 4): - # Can't set __name__ in 2.3 - import new - def _set_function_name(func, name): - func = new.function(func.__code__, func.__globals__, - name, func.__defaults__, func.__closure__) - return func -else: - def _set_function_name(func, name): - func.__name__ = name - return func +def _set_function_name(func, name): + func.__name__ = name + return func + class _Deprecate(object): """ |
