Skip to content

gh-152132: Close stderr_copy in test_api.test_run#153591

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:test_run_close
Jul 11, 2026
Merged

gh-152132: Close stderr_copy in test_api.test_run#153591
vstinner merged 1 commit into
python:mainfrom
vstinner:test_run_close

Conversation

@vstinner

@vstinner vstinner commented Jul 11, 2026

Copy link
Copy Markdown
Member

Previously, the test was leaking file descriptors.

Previously, the test was leaking a file descriptor.
@vstinner vstinner added skip news needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jul 11, 2026
@bedevere-app bedevere-app Bot added tests Tests in the Lib/test dir awaiting core review labels Jul 11, 2026
@vstinner vstinner enabled auto-merge (squash) July 11, 2026 21:00
@vstinner

Copy link
Copy Markdown
Member Author

Windows / Build and test (Win32, switch-case): test_logging fails with:

FAIL: test_rollover_at_midnight (test.test_logging.TimedRotatingFileHandlerTest.test_rollover_at_midnight)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\cpython\cpython\Lib\test\test_logging.py", line 6749, in test_rollover_at_midnight
    self.assertIn(f'testing2 {i}', line)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'testing2 0' not found in '2026-07-11 21:19:17,102 testing1 0\n'

@vstinner vstinner merged commit 0023d5b into python:main Jul 11, 2026
99 of 101 checks passed
@vstinner vstinner deleted the test_run_close branch July 11, 2026 21:55
@miss-islington-app

Copy link
Copy Markdown

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Jul 11, 2026

Copy link
Copy Markdown

GH-153595 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 11, 2026
@bedevere-app

bedevere-app Bot commented Jul 11, 2026

Copy link
Copy Markdown

GH-153596 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jul 11, 2026
@bedevere-app

bedevere-app Bot commented Jul 11, 2026

Copy link
Copy Markdown

GH-153597 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jul 11, 2026
vstinner added a commit that referenced this pull request Jul 11, 2026
…153597)

gh-152132: Close stderr_copy in test_api.test_run (GH-153591)

Previously, the test was leaking a file descriptor.
(cherry picked from commit 0023d5b)

Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner added a commit that referenced this pull request Jul 11, 2026
…153596)

gh-152132: Close stderr_copy in test_api.test_run (GH-153591)

Previously, the test was leaking a file descriptor.
(cherry picked from commit 0023d5b)

Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner added a commit that referenced this pull request Jul 11, 2026
…153595)

gh-152132: Close stderr_copy in test_api.test_run (GH-153591)

Previously, the test was leaking a file descriptor.
(cherry picked from commit 0023d5b)

Co-authored-by: Victor Stinner <vstinner@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant