-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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___all__ and test_distutils alters the enviroinment: pkg_resources.PEP440Warning #84236
Comments
Even when no test is run, test_distutils alters the environment: $ ./python -m test -v --fail-env-changed test_distutils -m DONTEXISTS
== CPython 3.7.7+ (heads/3.7:1cdc61c767, Mar 24 2020, 17:25:30) [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)]
== Linux-5.5.9-200.fc31.x86_64-x86_64-with-fedora-31-Thirty_One little-endian
== cwd: /home/vstinner/python/3.7/build/test_python_157151
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 0.37 Run tests sequentially
0:00:00 load avg: 0.37 [1/1] test_distutils Ran 0 tests in 0.001s OK == Tests result: NO TEST RUN == 1 test run no tests: Total duration: 655 ms The problem comes from Lib/distutils/tests/test_check.py: "from distutils.command.check import check, HAS_DOCUTILS" imports indirectly the docutils module which imports pkg_resources. pkg_resources changes warnings filters. docutils is installed by python3-docutils-0.15.2-1.fc31.noarch package and pkg_resources comes from python3-setuptools-41.6.0-1.fc31.noarch package. Attached PR disables docutils to avoid side effects of "import docutils" like pkg_resources modifying warnings filters. |
Here is the line which alters warnings filters: $ grep warnings /usr/lib/python3.7/site-packages/pkg_resources/__init__.py
(...)
warnings.filterwarnings("ignore", category=PEP440Warning, append=True) |
…als (pythonGH-95837) Under certain build conditions, test_check_c_globals fails. This fix takes the same approach as we took for pythongh-84236 (via pythongh-20095). We'll be removing use of distutils in the c-analyzer at some point. Until then we'll hide the warning filter. (cherry picked from commit 3ff6d9a) Co-authored-by: Eric Snow <[email protected]>
…H-95837) (GH-95843) Under certain build conditions, test_check_c_globals fails. This fix takes the same approach as we took for gh-84236 (via gh-20095). We'll be removing use of distutils in the c-analyzer at some point. Until then we'll hide the warning filter. (cherry picked from commit 3ff6d9a) Co-authored-by: Eric Snow <[email protected]>
…als (pythonGH-95837) Under certain build conditions, test_check_c_globals fails. This fix takes the same approach as we took for pythongh-84236 (via pythongh-20095). We'll be removing use of distutils in the c-analyzer at some point. Until then we'll hide the warning filter. (cherry picked from commit 3ff6d9a) Co-authored-by: Eric Snow <[email protected]>
…H-95837) Under certain build conditions, test_check_c_globals fails. This fix takes the same approach as we took for gh-84236 (via gh-20095). We'll be removing use of distutils in the c-analyzer at some point. Until then we'll hide the warning filter. (cherry picked from commit 3ff6d9a) Co-authored-by: Eric Snow <[email protected]>
…als (pythonGH-95837) Under certain build conditions, test_check_c_globals fails. This fix takes the same approach as we took for pythongh-84236 (via pythongh-20095). We'll be removing use of distutils in the c-analyzer at some point. Until then we'll hide the warning filter.
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: