bpo-33792: Add selector and proactor windows policies#7487
bpo-33792: Add selector and proactor windows policies#74871st1 merged 1 commit intopython:masterfrom
Conversation
|
There's no adequate documentation on asyncio policies that lists all of them. I'll try to work on that in a separate PR. |
vstinner
left a comment
There was a problem hiding this comment.
LGTM.
The new classes should be documented around https://docs.python.org/dev/library/asyncio-eventloops.html#event-loop-policies-and-the-default-policy
But it can be done later, right now event DefaultEventLoopPolicy is not properly documented... It's just mentionned one.
Please backport the change to 3.7 :-)
|
Oh wow, AppVeyor failed with a weird error!? |
Ok, works for me. |
Not sure if it's related; restarted the CI. |
|
@ned-deily @vstinner The CI crash on Windows buildbots is real and I have no idea what's going on. It seems to be completely unrelated to asyncio. Here's a screenshot from my Win VM: If we comment out class WindowsProactorEventLoopPolicy(events.BaseDefaultEventLoopPolicy):
_loop_factory = ProactorEventLoopthen everything works fine. The problem is that |
|
Would it help to pull in some of the Windows experts? (I’ll be off line for the next few hours.) |
|
Victor was also able to reproduce the bug. But the CI is green now... The crash is specific to 32bit builds and seems to be originating from class Handle:
"""Object returned by callback registration methods."""
__slots__ = ('_callback', '_args', '_cancelled', '_loop',
'_source_traceback', '_repr', '__weakref__',
'_context')
def __init__(self, callback, args, loop, context=None):
if context is None:
context = contextvars.copy_current() # << this lineIf we add a simple
|
|
The crash is https://bugs.python.org/issue33803 and it's unrelated to this change. It's just that the change made the bug more likely. |
|
Thanks @1st1 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7. |
(cherry picked from commit 8f40429) Co-authored-by: Yury Selivanov <yury@magic.io>
|
GH-7508 is a backport of this pull request to the 3.7 branch. |

https://bugs.python.org/issue33792