python / python/cpython

Stop test_ssl from changing environment

Open
#131,305 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

tests topic-SSL type-bug
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

On my Win10, buildt yesterday and today, py -m test and py -m test test_ssl sometimes (>50%) changes the environment, which is a failure for the whole suite (test alone).

0:01:43 load avg: 2.28 [466/485/1] test_ssl failed (env changed) (31.1 sec) -
Warning -- warnings.filters was modified by test_ssl
Warning --   Before: (2199023321584, [], [])
Warning --   After:  (2199661512208, [('always', None, <class 'ResourceWarning'>, None, 0)], [('always', None, <class 'ResourceWarning'>, None, 0)])

About 5 runs with -v added don't show this, though there are a few hundred lines of output with several ssl error tracebacks that do not cause a test failure.

Might just be my machine if no CI errors.

EDIT: py ran installed 3.14.0a5. Just reran twice with today's buld with python ... to run the build and got the same. Install is norma + gil. Build is debug no-gil.

Installed new 3.14.0a6 and ran 5 times without failure. I rechecked and my python build with the problem is post-release 3.14.0a6+.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running py -m test test_ssl and the full py -m test suite on the reported Windows debug no-GIL build, comparing runs with and without -v. Investigate the reported warnings.filters environment change and ssl error tracebacks; done means repeated runs no longer report test_ssl failed (env changed).

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.