Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
merged 1 commit into from
Apr 9, 2018

Conversation

charris
Copy link
Member

@charris charris commented Apr 4, 2018

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.

@charris
Copy link
Member Author

charris commented Apr 4, 2018

Apparently nose automatically tries to import umath_tests. So this might need to wait for the switch to pytest.

@charris charris force-pushed the deprecate-some-imports branch from faca3c4 to ccd6965 Compare April 7, 2018 00:34
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.
# 2018-04-04, numpy 1.15.0
warnings.warn("Importing from numpy.testing.utils is deprecated, "
"import from numpy.testing instead.",
ImportWarning, stacklevel=2)
Copy link
Member

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?

Copy link
Member Author

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?

Copy link
Member Author

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 :)

@bsipocz
Copy link
Member

bsipocz commented Sep 13, 2019

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider reverting the renaming of compiled c test modules (part of the pytest move)?
2 participants