Skip to content
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

Merged
merged 2 commits into from
May 29, 2018
Merged

Conversation

1st1
Copy link
Member

@1st1 1st1 commented May 29, 2018

Original patch by Dan O'Reilly.

https://bugs.python.org/issue22087

@pitrou
Copy link
Member

pitrou commented May 29, 2018

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.

@1st1
Copy link
Member Author

1st1 commented May 29, 2018

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.

Copy link
Member

@pitrou pitrou left a 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?

@1st1
Copy link
Member Author

1st1 commented May 29, 2018

I'm assuming the test isn't run on Windows?

Yes, it's only for Unix.

Copy link
Contributor

@asvetlov asvetlov left a comment

Choose a reason for hiding this comment

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

lgtm

@1st1 1st1 merged commit 5d97b7b into python:master May 29, 2018
@miss-islington
Copy link
Contributor

Thanks @1st1 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7.
🐍🍒⛏🤖

@1st1 1st1 deleted the fixfork branch May 29, 2018 19:38
@bedevere-bot
Copy link

GH-7215 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 29, 2018
Original patch by Dan O'Reilly.
(cherry picked from commit 5d97b7b)

Co-authored-by: Yury Selivanov <[email protected]>
@miss-islington
Copy link
Contributor

Sorry, @1st1, I could not cleanly backport this to 3.6 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 5d97b7bcc19496617bf8c448d2f149cc28c73bc7 3.6

@bedevere-bot
Copy link

GH-7218 is a backport of this pull request to the 3.6 branch.

miss-islington added a commit that referenced this pull request May 29, 2018
Original patch by Dan O'Reilly.
(cherry picked from commit 5d97b7b)

Co-authored-by: Yury Selivanov <[email protected]>
1st1 added a commit to 1st1/cpython that referenced this pull request May 29, 2018
1st1 added a commit to 1st1/cpython that referenced this pull request May 29, 2018
1st1 added a commit to 1st1/cpython that referenced this pull request May 29, 2018
1st1 added a commit that referenced this pull request May 30, 2018
1st1 added a commit that referenced this pull request May 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants