-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
bpo-22087: Fix Policy.get_event_loop() to detect fork #7208
Conversation
…w loop. Original patch by Dan O'Reilly.
I think it would be nice if the test did a bit more, for example run some coroutine or perhaps even some simple socket ping-pong. That would check that other infrastructure is also fork-safe, not just the event loop instantiation logic. |
Sure, added a basic test for that. Don't think we need more than that though, as the entirety of "other infrastructure" should be initialized via the loop's constructor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'm assuming the test isn't run on Windows?
Yes, it's only for Unix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thanks @1st1 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7. |
GH-7215 is a backport of this pull request to the 3.7 branch. |
Original patch by Dan O'Reilly. (cherry picked from commit 5d97b7b) Co-authored-by: Yury Selivanov <[email protected]>
Sorry, @1st1, I could not cleanly backport this to |
GH-7218 is a backport of this pull request to the 3.6 branch. |
Original patch by Dan O'Reilly. (cherry picked from commit 5d97b7b) Co-authored-by: Yury Selivanov <[email protected]>
Original patch by Dan O'Reilly.
Original patch by Dan O'Reilly.
https://bugs.python.org/issue22087