-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
[FreeThreading] test_ssl fails with env_changed: warnings.filters was modified by test_ssl #126483
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
Comments
To add to your description: So it's not safe to run |
cc @nascheme |
Should be fixed now as warnings is thread safe now. |
It's safe (and only by default) on the free threaded builds, but not on the regular builds |
…_check_hostname_idn use by test_ssl_in_multiple_threads
this also needs fixing on 3.13 |
…32694) The `test_ssl_in_multiple_threads` test failed because `test_check_hostname_idn()` modified the global warnings filters via `warnings_helper.check_no_resource_warning()`. Only check for warnings when the context aware warnings feature is enabled, which makes the warnings filter context-local and thread-safe.
…pythonGH-132694) The `test_ssl_in_multiple_threads` test failed because `test_check_hostname_idn()` modified the global warnings filters via `warnings_helper.check_no_resource_warning()`. Only check for warnings when the context aware warnings feature is enabled, which makes the warnings filter context-local and thread-safe. (cherry picked from commit 40c8be0) Co-authored-by: Thomas Grainger <[email protected]>
…pythonGH-132694) The `test_ssl_in_multiple_threads` test failed because `test_check_hostname_idn()` modified the global warnings filters via `warnings_helper.check_no_resource_warning()`. Only check for warnings when the context aware warnings feature is enabled, which makes the warnings filter context-local and thread-safe. (cherry picked from commit 40c8be0) Co-authored-by: Thomas Grainger <[email protected]>
GH-132694) (GH-135131) The `test_ssl_in_multiple_threads` test failed because `test_check_hostname_idn()` modified the global warnings filters via `warnings_helper.check_no_resource_warning()`. Only check for warnings when the context aware warnings feature is enabled, which makes the warnings filter context-local and thread-safe. (cherry picked from commit 40c8be0) Co-authored-by: Thomas Grainger <[email protected]>
GH-132694) (GH-135132) The `test_ssl_in_multiple_threads` test failed because `test_check_hostname_idn()` modified the global warnings filters via `warnings_helper.check_no_resource_warning()`. Disable the warnings check in the multi-threaded test because `warnings_helper` isn't thread-safe in 3.13 or earlier. (cherry picked from commit 40c8be0) Co-authored-by: Thomas Grainger <[email protected]> * Fix for 3.13 --------- Co-authored-by: Thomas Grainger <[email protected]> Co-authored-by: Sam Gross <[email protected]>
Thanks for fixing this @graingert |
Uh oh!
There was an error while loading. Please reload this page.
On a Free Threaded build, test_ssl fails with:
The problem comes from
test_check_hostname_idn()
which useswarnings_helper.check_no_resource_warning()
(changes warnings filters).Linked PRs
The text was updated successfully, but these errors were encountered: