[New-bugs-announce] [issue41003] test_copyreg: importing numpy changes warnings filters

STINNER Victor report at bugs.python.org
Wed Jun 17 08:45:57 EDT 2020


New submission from STINNER Victor <vstinner at python.org>:

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

----------
components: Tests
messages: 371736
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_copyreg: importing numpy changes warnings filters
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41003>
_______________________________________


More information about the New-bugs-announce mailing list