Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 2 commits intopython:mainfromvstinner:cleanup_tests
Sep 12, 2023

Conversation

vstinner
Copy link
Member

@vstinnervstinner commentedSep 12, 2023
edited by bedevere-appbot
Loading

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 bycalling multiprocessing _cleanup_tests(): explicitly clean upresources and stop background processes like the resource tracker.
@vstinnervstinner added testsTests in the Lib/test dir needs backport to 3.11only security fixes needs backport to 3.12only security fixes labelsSep 12, 2023
@gvanrossumgvanrossum changed the titlegh-109295: test_asyncio and test_compileall clean multiprocessinggh-109295: Clean up multiprocessing in test_asyncio and test_compileallSep 12, 2023
Copy link
Member

@gvanrossumgvanrossum 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.)

@vstinnervstinner merged commit09ea4b8 intopython:mainSep 12, 2023
@vstinnervstinner deleted the cleanup_tests branchSeptember 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 requestSep 12, 2023
…mpileall (pythonGH-109298)test_asyncio and test_compileall now clean up multiprocessing bycalling multiprocessing _cleanup_tests(): explicitly clean upresources and stop background processes like the resource tracker.(cherry picked from commit09ea4b8)Co-authored-by: Victor Stinner <vstinner@python.org>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestSep 12, 2023
…mpileall (pythonGH-109298)test_asyncio and test_compileall now clean up multiprocessing bycalling multiprocessing _cleanup_tests(): explicitly clean upresources and stop background processes like the resource tracker.(cherry picked from commit09ea4b8)Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-app
Copy link

GH-109301 is a backport of this pull request to the3.12 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.12only security fixes labelSep 12, 2023
@bedevere-app
Copy link

GH-109302 is a backport of this pull request to the3.11 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.11only security fixes labelSep 12, 2023
@vstinner
Copy link
MemberAuthor

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
MemberAuthor

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 requestSep 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 bycalling multiprocessing _cleanup_tests(): explicitly clean upresources and stop background processes like the resource tracker.(cherry picked from commit09ea4b8)Co-authored-by: Victor Stinner <vstinner@python.org>
Yhg1s pushed a commit that referenced this pull requestSep 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 bycalling multiprocessing _cleanup_tests(): explicitly clean upresources and stop background processes like the resource tracker.(cherry picked from commit09ea4b8)Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner added a commit to vstinner/cpython that referenced this pull requestSep 13, 2023
…mpileall (python#109298)test_asyncio and test_compileall now clean up multiprocessing bycalling multiprocessing _cleanup_tests(): explicitly clean upresources and stop background processes like the resource tracker.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@gvanrossumgvanrossumgvanrossum approved these changes

@1st11st1Awaiting requested review from 1st11st1 is a code owner

@asvetlovasvetlovAwaiting requested review from asvetlovasvetlov is a code owner

@kumaraditya303kumaraditya303Awaiting requested review from kumaraditya303kumaraditya303 is a code owner

@willingcwillingcAwaiting requested review from willingcwillingc is a code owner

Assignees
No one assigned
Labels
skip newstestsTests in the Lib/test dir
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@vstinner@miss-islington@gvanrossum

[8]ページ先頭

©2009-2025 Movatter.jp