bpo-22087: Fix Policy.get_event_loop() to detect fork#7208
bpo-22087: Fix Policy.get_event_loop() to detect fork#72081st1 merged 2 commits intopython:masterfrom
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. |
pitrou
left a comment
There was a problem hiding this comment.
LGTM. I'm assuming the test isn't run on Windows?
Yes, it's only for Unix. |
|
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 <yury@magic.io>
|
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.
Original patch by Dan O'Reilly.
https://bugs.python.org/issue22087