Skip to content

gh-102251: Explicitly free state for test modules with state in test_import - #105085

Merged
erlend-aasland merged 8 commits into
python:mainfrom
sunmy2019:gh-102251-2
May 31, 2023
Merged

erlend-aasland merged 8 commits into
python:mainfrom
sunmy2019:gh-102251-2

Conversation

@sunmy2019

@sunmy2019 sunmy2019 commented May 30, 2023 •

Copy link
Copy Markdown
Member

The module state is not cleared in the clean-up functions. This PR adds one clean-up function for it.

This fixes the second issue mentioned in #103879 (comment)

@erlend-aasland

Copy link
Copy Markdown
Contributor

Can you update the PR title to reflect the actual change?

@sunmy2019 sunmy2019 changed the title gh-102251: Fix ref leaks in test_import May 30, 2023
Comment thread Modules/_testsinglephase.c Resolved
Comment thread Lib/test/test_import/__init__.py Resolved
Comment thread Lib/test/test_import/__init__.py Resolved
Comment thread Modules/_testsinglephase.c Resolved
Comment thread Lib/test/test_import/__init__.py Resolved
Comment thread Lib/test/test_import/__init__.py Resolved
Comment thread Lib/test/test_import/__init__.py Resolved
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Comment thread Lib/test/test_import/__init__.py Resolved
@erlend-aasland erlend-aasland added the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label May 30, 2023
@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @erlend-aasland for commit 26a9ede 🤖

If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label May 30, 2023
@brettcannon
brettcannon removed their request for review May 30, 2023 19:19
@erlend-aasland erlend-aasland changed the title gh-102251: Add clean-up function for _testsinglephase_with_state May 31, 2023
@erlend-aasland

Copy link
Copy Markdown
Contributor

Approved by Eric in #104796 (review), as part of a larger PR.

@erlend-aasland
erlend-aasland merged commit a99b9d9 into python:main May 31, 2023
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @sunmy2019 for the PR, and @erlend-aasland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 31, 2023
… test_import (pythonGH-105085)

(cherry picked from commit a99b9d9)

Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
@bedevere-bot

Copy link
Copy Markdown

GH-105170 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label May 31, 2023
erlend-aasland added a commit that referenced this pull request May 31, 2023
…n test_import (GH-105085) (#105170)

(cherry picked from commit a99b9d9)

Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
sunmy2019 added a commit to sunmy2019/cpython that referenced this pull request Jun 1, 2023
@sunmy2019
sunmy2019 deleted the gh-102251-2 branch June 23, 2023 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants