DEP: Issue deprecation warnings for some imports.#10850
Conversation
|
Apparently nose automatically tries to import |
faca3c4 to
ccd6965
Compare
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 numpy#10845.
ccd6965 to
cf73c76
Compare
| # 2018-04-04, numpy 1.15.0 | ||
| warnings.warn("Importing from numpy.testing.utils is deprecated, " | ||
| "import from numpy.testing instead.", | ||
| ImportWarning, stacklevel=2) |
There was a problem hiding this comment.
@charris - any reasons this doesn't become a DeprecationWarning like the rest of this PR?
There was a problem hiding this comment.
Looks like an oversight while settling on the final form. I don't recall any details at this point :) Want to make a PR?
There was a problem hiding this comment.
Possibly changing this could break downstream code that was working around it, but hey, the code should get fixed anyway :)
|
Sure, I'll PR it over the weekend. We accidentally run into this downstream, and wondered why it didn't make a failure sooner (we raise deprecations as exceptions to spot them as soon as possible, but this crept through that machinery). |
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.
Closes #10845.