-
Notifications
You must be signed in to change notification settings - Fork 963
Description
More and more libraries are switching from threading.local to contextvars.ContextVar.
(So far) gevent does not support contextvars. This leads to the situation that libraries need to explicitly check if gevent is used and then select the "old style" implementation. Example: elastic/apm-agent-python@090b938
Alternativbely the libraries are not working properly with gevent at all: census-instrumentation/opencensus-python#628
I could find very few information if there is any chance for gevent to support contextvars. I found a claim that it is not feasible due to its C implementation. At the same time PEP 550 at least mentioned gevent - in the final 567 this is no more the case though.
If it should not be possible some words in the docs would be helpful I think.