8000 gh-109295: Clean up multiprocessing in test_asyncio and test_compileall by vstinner · Pull Request #109298 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-109295: Clean up multiprocessing in test_asyncio and test_compileall #109298

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 12, 2023

Conversation

vstinner
Copy link
Member
@vstinner vstinner commented Sep 12, 2023

test_asyncio and test_compileall now clean up multiprocessing by calling _cleanup_tests() method: explicitly clean up resources and stop background processes like the resource tracker.

test_asyncio and test_compileall now clean up multiprocessing by
calling multiprocessing _cleanup_tests(): explicitly clean up
resources and stop background processes like the resource tracker.
@vstinner vstinner added tests Tests in the Lib/test dir needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Sep 12, 2023
@gvanrossum gvanrossum changed the title gh-109295: test_asyncio and test_compileall clean multiprocessing gh-109295: Clean up multiprocessing in test_asyncio and test_compileall Sep 12, 2023
Copy link
Member
@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gah. Why do we have compileall and py_compile in the stdlib. :-( (That's a rhetorical question.)

@vstinner vstinner merged commit 09ea4b8 into python:main Sep 12, 2023
@vstinner vstinner deleted the cleanup_tests branch September 12, 2023 01:31
@miss-islington
Copy link
Contributor

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 12, 2023
…mpileall (pythonGH-109298)

test_asyncio and test_compileall now clean up multiprocessing by
calling multiprocessing _cleanup_tests(): explicitly clean up
resources and stop background processes like the resource tracker.
(cherry picked from commit 09ea4b8)

Co-authored-by: Victor Stinner <vstinner@python.org>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 12, 2023
…mpileall (pythonGH-109298)

test_asyncio and test_compileall now clean up multiprocessing by
calling multiprocessing _cleanup_tests(): explicitly clean up
resources and stop background processes like the resource tracker.
(cherry picked from commit 09ea4b8)

Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-app
Copy link
bedevere-app bot commented Sep 12, 2023

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

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Sep 12, 2023
@bedevere-app
Copy link
bedevere-app bot commented Sep 12, 2023

GH-109302 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Sep 12, 2023
@vstinner
Copy link
Member Author

Gah. Why do we have compileall and py_compile in the stdlib. :-( (That's a rhetorical question.)

Well, why do we have asyncio and multiprocessing in the stlidb? Why do you have a stdlib? (That's a rhetorical question.) 😂

@vstinner
Copy link
Member Author

I would prefer that multiprocessing and concurrent.futures would have a more explicit API to manage resources. Rather than spawning processes in the background with no public API to be aware of that, nor an API to cleanup these processes. There are temporary directories, processes, shared memory, etc. Not trivial resources like a single large memory block.

vstinner added a commit that referenced this pull request Sep 12, 2023
…ompileall (GH-109298) (#109302)

gh-109295: Clean up multiprocessing in test_asyncio and test_compileall (GH-109298)

test_asyncio and test_compileall now clean up multiprocessing by
calling multiprocessing _cleanup_tests(): explicitly clean up
resources and stop background processes like the resource tracker.
(cherry picked from commit 09ea4b8)

Co-authored-by: Victor Stinner <vstinner@python.org>
Yhg1s pushed a commit that referenced this pull request Sep 12, 2023
…ompileall (GH-109298) (#109301)

gh-109295: Clean up multiprocessing in test_asyncio and test_compileall (GH-109298)

test_asyncio and test_compileall now clean up multiprocessing by
calling multiprocessing _cleanup_tests(): explicitly clean up
resources and stop background processes like the resource tracker.
(cherry picked from commit 09ea4b8)

Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner added a commit to vstinner/cpython that referenced this pull request Sep 13, 2023
…mpileall (python#109298)

test_asyncio and test_compileall now clean up multiprocessing by
calling multiprocessing _cleanup_tests(): explicitly clean up
resources and stop background processes like the resource tracker.
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.

3 participants
0