Skip to content

[FreeThreading] test_ssl fails with env_changed: warnings.filters was modified by test_ssl #126483

Closed
@vstinner

Description

@vstinner

On a Free Threaded build, test_ssl fails with:

$ ./python -m test test_ssl --fail-env-changed -m test_ssl_in_multiple_threads 
(...)
Warning -- warnings.filters was modified by test_ssl
Warning --   Before: (2199023321584, [], [])
Warning --   After:  (2199997062288, [('always', None, <class 'ResourceWarning'>, None, 0)], [('always', None, <class 'ResourceWarning'>, None, 0)]) 
test_ssl failed (env changed)
(...)
Result: ENV CHANGED

The problem comes from test_check_hostname_idn() which uses warnings_helper.check_no_resource_warning() (changes warnings filters).

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixestestsTests in the Lib/test dirtopic-free-threading

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions