diff options
-rw-r--r-- | doc/release/upcoming_changes/15255.compatibility.rst | 12 | ||||
-rw-r--r-- | numpy/distutils/compat.py | 10 | ||||
-rw-r--r-- | numpy/tests/test_public_api.py | 1 |
3 files changed, 12 insertions, 11 deletions
diff --git a/doc/release/upcoming_changes/15255.compatibility.rst b/doc/release/upcoming_changes/15255.compatibility.rst new file mode 100644 index 000000000..e360eeeb3 --- /dev/null +++ b/doc/release/upcoming_changes/15255.compatibility.rst @@ -0,0 +1,12 @@ +``numpy.distutils.compat`` has been removed +------------------------------------------- +This module contained only the function ``get_exception()``, which was used as:: + + try: + ... + except Exception: + e = get_exception() + +Its purpose was to handle the change in syntax introduced in Python 2.6, from +``except Exception, e:`` to ``except Exception as e:``, meaning it was only +necessary for codebases supporting Python 2.5 and older. diff --git a/numpy/distutils/compat.py b/numpy/distutils/compat.py deleted file mode 100644 index 9a81cd392..000000000 --- a/numpy/distutils/compat.py +++ /dev/null @@ -1,10 +0,0 @@ -"""Small modules to cope with python 2 vs 3 incompatibilities inside -numpy.distutils - -""" -from __future__ import division, absolute_import, print_function - -import sys - -def get_exception(): - return sys.exc_info()[1] diff --git a/numpy/tests/test_public_api.py b/numpy/tests/test_public_api.py index 0484bb8cd..5f5ff8be0 100644 --- a/numpy/tests/test_public_api.py +++ b/numpy/tests/test_public_api.py @@ -228,7 +228,6 @@ PRIVATE_BUT_PRESENT_MODULES = ['numpy.' + s for s in [ "distutils.command.install_data", "distutils.command.install_headers", "distutils.command.sdist", - "distutils.compat", "distutils.conv_template", "distutils.core", "distutils.extension", |