Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Merged
merged 8 commits into from
May 31, 2023

Conversation

sunmy2019
Copy link
Member

@sunmy2019 sunmy2019 commented May 30, 2023

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
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 gh-102251: Add clean-up function for _testsinglephase_with_state May 30, 2023
Lib/test/test_import/__init__.py Outdated Show resolved Hide resolved
Lib/test/test_import/__init__.py Outdated Show resolved Hide resolved
Modules/_testsinglephase.c Outdated Show resolved Hide resolved
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
@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

🤖 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 gh-102251: Explicitly free state for test modules with state in test_import May 31, 2023
@erlend-aasland
Copy link
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
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

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 bug and 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
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants