-
-
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_warnings
fails if run with -Werror
#122191
Comments
Well, I spent some time tracking the error back to '/**/cpython/cpython/Lib/importlib/_bootstrap_external.py' at "_bless_my_loader," where it checks if the module globals contain loader or spec. At line 935, it raises a warning:
Since test_warning tests warnings, it doesn't make sense to run it with --Werror, which treats warnings as errors. |
__spec__.loader is now required in the module globals (see pythongh-86298).
In future, warnings will be turned into errors. Unless we are planning to remove these tests, the warnings should not be ignored. |
…nGH-122222) __spec__.loader is now required in the module globals (see pythongh-86298). (cherry picked from commit 9b4fe9b) Co-authored-by: Serhiy Storchaka <[email protected]>
…pythonGH-122222) __spec__.loader is now required in the module globals (see pythongh-86298). (cherry picked from commit 9b4fe9b) Co-authored-by: Serhiy Storchaka <[email protected]>
…22222) (GH-122256) __spec__.loader is now required in the module globals (see gh-86298). (cherry picked from commit 9b4fe9b) Co-authored-by: Serhiy Storchaka <[email protected]>
Bug report
Bug description:
./python.exe -Werror -m test test_warnings
fails, which feels sort-of ironic:CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
Linked PRs
The text was updated successfully, but these errors were encountered: