-
Notifications
You must be signed in to change notification settings - Fork 553
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
contextvars.Context not activated for connection_made() #305
Labels
Comments
Context not being restored for protocol_factory call is what causing problems. python's asyncio copies current context (by creating callback handle) when creating uvloop simply calls |
Yes, this is a bug. |
This PR needs to be considered as part of this issue, basically #306 |
fantix
added a commit
to fantix/uvloop
that referenced
this issue
May 25, 2020
fantix
pushed a commit
to fantix/uvloop
that referenced
this issue
Jan 25, 2021
fantix
pushed a commit
to fantix/uvloop
that referenced
this issue
Feb 5, 2021
fantix
pushed a commit
to fantix/uvloop
that referenced
this issue
Feb 5, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PYTHONASYNCIODEBUG
in env?: YesCode works as expected on asyncio loop (
var
has value in handler) but fails with uvloop. I tracked difference up toconnection_made()
:There is similar difference in
UVStreamHandler._on_listen
:uvloop/uvloop/handles/streamserver.pyx
Line 67 in 35f8250
protocol_handler()
is being called without context activation, while with asyncio it receives context. I'm not sure if this can be the root cause.The text was updated successfully, but these errors were encountered: