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-98023: Change default child watcher toPidfdChildWatcher on supported systems#98024

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
gvanrossum merged 4 commits intopython:mainfromkumaraditya303:pidfd
Oct 8, 2022

Conversation

@kumaraditya303
Copy link
Contributor

@kumaraditya303kumaraditya303 commentedOct 7, 2022
edited by bedevere-bot
Loading

@kumaraditya303kumaraditya303 added type-featureA feature request or enhancement topic-asyncio 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelsOct 7, 2022
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@kumaraditya303 for commit2e26bf5 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelOct 7, 2022
@kumaraditya303
Copy link
ContributorAuthor

The unicode failure will be fixed by#98036 and is unrelated.

@kumaraditya303kumaraditya303 marked this pull request as ready for reviewOctober 7, 2022 18:05
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.

This LGTM, but...

I reviewed the child watcher architecture with@1st1 and we want to first do a refactoring on PidfdChildWatcher. Basically the current PidfdChildWatcher attaches itself to the event loop in the main thread, and if it is called from a loop in another thread it won't work. ThreadedChildWatcher doesn't have this problem.

HOWEVER, Yury has a simple refactoring of PidfdChildWatcher in mind that will solve this problem! It will make attach_loop() a no-op, and is_active() will always be True -- just as it is for the ThreadedChildWatcher.

So once Yury's change is merged, this can be merged. (We don't quite have a PR but there will be one soon, I promise.)

@gvanrossum
Copy link
Member

gvanrossum commentedOct 7, 2022
edited
Loading

Actually,@grangert already has a complete PR (GH-94184) to make PidfdChildWatcher independent from the loop, so we'll merge that, then this.

@gvanrossum
Copy link
Member

The docs failure is due to something that was accidentally merged, no point in updating and re-running all the tests. The Azure failure is due to the same thing. Still waiting forGH-94184 to go green and merge.

@gvanrossumgvanrossum merged commit8ba9378 intopython:mainOct 8, 2022
@kumaraditya303kumaraditya303 deleted the pidfd branchOctober 8, 2022 06:15
carljm added a commit to carljm/cpython that referenced this pull requestOct 8, 2022
* main:pythongh-68686: Retire eptag ptag scripts (python#98064)pythongh-97922: Run the GC only on eval breaker (python#97920)  GitHub Workflows security hardening (python#96492)  Add `@ezio-melotti` as codeowner for `.github/`. (python#98079)pythongh-97913 Docs: Add walrus operator to the index (python#97921)  [doc] Fix broken links to C extensions accelerating stdlib modules (python#96914)pythongh-97822: Fix http.server documentation reference to test() function (python#98027)pythongh-91052: Add PyDict_Unwatch for unwatching a dictionary (python#98055)pythonGH-98023: Change default child watcher to PidfdChildWatcher on supported systems (python#98024)pythonGH-94182: Run the PidfdChildWatcher on the running loop (python#94184)
carljm added a commit to carljm/cpython that referenced this pull requestOct 9, 2022
* main: (5519 commits)  Minor edits to the Descriptor HowTo Guide (pythonGH-24901)  Fix link to Lifecycle of a Pull Request in CONTRIBUTING (python#98102)pythonGH-94597: deprecate `SafeChildWatcher`, `FastChildWatcher` and `MultiLoopChildWatcher` child watchers  (python#98089)  Auto-cancel old builds when new commit pushed to branch (python#98009)pythongh-95011: Migrate syslog module to Argument Clinic (pythonGH-95012)pythongh-68686: Retire eptag ptag scripts (python#98064)pythongh-97922: Run the GC only on eval breaker (python#97920)  GitHub Workflows security hardening (python#96492)  Add `@ezio-melotti` as codeowner for `.github/`. (python#98079)pythongh-97913 Docs: Add walrus operator to the index (python#97921)  [doc] Fix broken links to C extensions accelerating stdlib modules (python#96914)pythongh-97822: Fix http.server documentation reference to test() function (python#98027)pythongh-91052: Add PyDict_Unwatch for unwatching a dictionary (python#98055)pythonGH-98023: Change default child watcher to PidfdChildWatcher on supported systems (python#98024)pythonGH-94182: Run the PidfdChildWatcher on the running loop (python#94184)pythongh-92886: make test_ast pass with -O (assertions off) (pythonGH-98058)pythongh-92886: make test_coroutines pass with -O (assertions off) (pythonGH-98060)pythongh-57179: Add note on symlinks for os.walk (python#94799)pythongh-94808: Fix regex on exotic platforms (python#98036)pythongh-90085: Remove vestigial -t and -c timeit options (python#94941)  ...
mpage pushed a commit to mpage/cpython that referenced this pull requestOct 11, 2022
bdraco added a commit to bdraco/home-assistant that referenced this pull requestFeb 12, 2023
This is a backport from cpython 3.12https://docs.python.org/3/library/asyncio-policy.html> PidfdChildWatcher is a “Goldilocks” child watcher implementation. It doesn’t require signals or threads, doesn’t interfere with any processes launched outside the event loop, and scales linearly with the number of subprocesses launched by the event loop. The main disadvantage is that pidfds are specific to Linux, and only work on recent (5.3+) kernels.python/cpython#98024There are some additional fixes in cpython 3.12inpython/cpython#94184when there is no event loop running in the main threadbut this is not a problem we have
balloob pushed a commit to home-assistant/core that referenced this pull requestFeb 12, 2023
This is a backport from cpython 3.12https://docs.python.org/3/library/asyncio-policy.html> PidfdChildWatcher is a “Goldilocks” child watcher implementation. It doesn’t require signals or threads, doesn’t interfere with any processes launched outside the event loop, and scales linearly with the number of subprocesses launched by the event loop. The main disadvantage is that pidfds are specific to Linux, and only work on recent (5.3+) kernels.python/cpython#98024There are some additional fixes in cpython 3.12inpython/cpython#94184when there is no event loop running in the main threadbut this is not a problem we have
AlePerla pushed a commit to AlePerla/homeassistant_core that referenced this pull requestFeb 17, 2023
This is a backport from cpython 3.12https://docs.python.org/3/library/asyncio-policy.html> PidfdChildWatcher is a “Goldilocks” child watcher implementation. It doesn’t require signals or threads, doesn’t interfere with any processes launched outside the event loop, and scales linearly with the number of subprocesses launched by the event loop. The main disadvantage is that pidfds are specific to Linux, and only work on recent (5.3+) kernels.python/cpython#98024There are some additional fixes in cpython 3.12inpython/cpython#94184when there is no event loop running in the main threadbut this is not a problem we have
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@gvanrossumgvanrossumgvanrossum left review comments

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

@asvetlovasvetlovAwaiting requested review from asvetlovasvetlov is a code owner

Assignees

No one assigned

Labels

topic-asynciotype-featureA feature request or enhancement

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@kumaraditya303@bedevere-bot@gvanrossum

[8]ページ先頭

©2009-2025 Movatter.jp