From cf73c76d3078b30b521f8abd19ae7996987784f7 Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Wed, 4 Apr 2018 12:31:56 -0600 Subject: DEP: Issue deprecation warnings for some imports. The following modules have been moved or renamed and should not be imported. This adds shim modules for the old names that issue a DeprecationWarning on import. * numpy/core/umath_tests.py * numpy/testing/decorators.py * numpy/testing/noseclasses.py * numpy/testing/nosetester.py * numpy/testing/utils.py Closes #10845. --- numpy/testing/utils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'numpy/testing/utils.py') diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py index 3cd89e639..78cf405cf 100644 --- a/numpy/testing/utils.py +++ b/numpy/testing/utils.py @@ -3,10 +3,14 @@ Back compatibility utils module. It will import the appropriate set of tools """ +from __future__ import division, absolute_import, print_function + import warnings -warnings.warn("Import from numpy.testing, not numpy.testing.utils", - ImportWarning) +# 2018-04-04, numpy 1.15.0 +warnings.warn("Importing from numpy.testing.utils is deprecated, " + "import from numpy.testing instead.", + ImportWarning, stacklevel=2) from ._private.utils import * -- cgit v1.2.1