-
-
Notifications
You must be signed in to change notification settings - Fork 11k
DEP: Issue deprecation warnings for some imports. #10850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@charris - any reasons this doesn't become a DeprecationWarning like the rest of this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.