summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2023-01-21 15:29:22 -0700
committerCharles Harris <charlesr.harris@gmail.com>2023-01-21 17:06:44 -0700
commitd62280de7b4d7e0da26cbe3342ad85ed7562ef5b (patch)
tree593b9577f80719ef9bfd7522d9df4ab3d668c709
parent747823cc7e77d1e13705856d10a6ca2a46f4c47d (diff)
downloadnumpy-d62280de7b4d7e0da26cbe3342ad85ed7562ef5b.tar.gz
DEP: Remove the deprecated utils.py shim.
The shim has been deprecated since 2019, the proper place to import utils funtions is directly from numpy.testing.
-rw-r--r--doc/release/upcoming_changes/23060.expired.rst5
-rw-r--r--numpy/testing/utils.py29
-rw-r--r--numpy/tests/test_public_api.py1
3 files changed, 5 insertions, 30 deletions
diff --git a/doc/release/upcoming_changes/23060.expired.rst b/doc/release/upcoming_changes/23060.expired.rst
new file mode 100644
index 000000000..f80ba6fd0
--- /dev/null
+++ b/doc/release/upcoming_changes/23060.expired.rst
@@ -0,0 +1,5 @@
+The ``numpy.testing.utils`` shim has been removed.
+--------------------------------------------------
+Importing from the ``numpy.testing.utils`` shim has been deprecated since 2019,
+the shim has now been removed. All imports should be made directly from
+``numpy.testing``.
diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py
deleted file mode 100644
index 20a883304..000000000
--- a/numpy/testing/utils.py
+++ /dev/null
@@ -1,29 +0,0 @@
-"""
-Back compatibility utils module. It will import the appropriate
-set of tools
-
-"""
-import warnings
-
-# 2018-04-04, numpy 1.15.0 ImportWarning
-# 2019-09-18, numpy 1.18.0 DeprecatonWarning (changed)
-warnings.warn("Importing from numpy.testing.utils is deprecated "
- "since 1.15.0, import from numpy.testing instead.",
- DeprecationWarning, stacklevel=2)
-
-from ._private.utils import *
-from ._private.utils import _assert_valid_refcount, _gen_alignment_data
-
-__all__ = [
- 'assert_equal', 'assert_almost_equal', 'assert_approx_equal',
- 'assert_array_equal', 'assert_array_less', 'assert_string_equal',
- 'assert_array_almost_equal', 'assert_raises', 'build_err_msg',
- 'decorate_methods', 'jiffies', 'memusage', 'print_assert_equal',
- 'raises', 'rundocs', 'runstring', 'verbose', 'measure',
- 'assert_', 'assert_array_almost_equal_nulp', 'assert_raises_regex',
- 'assert_array_max_ulp', 'assert_warns', 'assert_no_warnings',
- 'assert_allclose', 'IgnoreException', 'clear_and_catch_warnings',
- 'SkipTest', 'KnownFailureException', 'temppath', 'tempdir', 'IS_PYPY',
- 'HAS_REFCOUNT', 'suppress_warnings', 'assert_array_compare',
- 'assert_no_gc_cycles'
- ]
diff --git a/numpy/tests/test_public_api.py b/numpy/tests/test_public_api.py
index cc6d0a033..15a847393 100644
--- a/numpy/tests/test_public_api.py
+++ b/numpy/tests/test_public_api.py
@@ -288,7 +288,6 @@ PRIVATE_BUT_PRESENT_MODULES = ['numpy.' + s for s in [
"random.mtrand",
"random.bit_generator",
"testing.print_coercion_tables",
- "testing.utils",
]]