-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
test_copyreg: importing numpy changes warnings filters #85175
Comments
This issue is similar to bpo-40055: running test_copyreg fails with ENV_CHANGED if numpy is available. Example: $ ./python -m venv env
$ env/bin/python -m pip install numpy
$ env/bin/python -m test --fail-env-changed -v test_copyreg -m xxxx
== CPython 3.9.0b3+ (heads/getpath_platlibdir39:11462e9847, Jun 11 2020, 17:49:13) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)]
(...)
Warning -- warnings.filters was modified by test_copyreg
Before: (140498488250848, [], [])
After: (140498488250848, [], [('ignore', re.compile('numpy.ndarray size changed', re.IGNORECASE), <class 'Warning'>, None, 0), ('ignore', re.compile('numpy.ufunc size changed', re.IGNORECASE), <class 'Warning'>, None, 0), ('ignore', re.compile('numpy.dtype size changed', re.IGNORECASE), <class 'Warning'>, None, 0), ('always', None, <class 'numpy.RankWarning'>, None, 0)])
(...) |
The issue can be replaced by a fake numpy module: $ cat Lib/numpy.py
import warnings
warnings.simplefilter('ignore', UserWarning) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: