This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Liran Nuna
Recipients Liran Nuna, asvetlov, yselivanov
Date 2018-06-20.21:10:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1529529014.65.0.56676864532.issue33918@psf.upfronthosting.co.za>
In-reply-to
Content
> You should try to use the contextvars module that was specifically created to handle local context state (for tasks & coroutines).

Yury, from my original report:

> I'm aware that this particular problem could be solved with the new context variables introduced with python3.7, however it is just a simplification of our actual issue.

Not everything can use context managers. Imagine the context manager is mock.patch used in testing and you want to run two tests in "parallel", each with a different mocked method. mock.patch isn't aware of `await` so patching will be incorrect.

Those are just some behaviors where context variables don't solve the issue I'm describing.
History
Date User Action Args
2018-06-20 21:10:14Liran Nunasetrecipients: + Liran Nuna, asvetlov, yselivanov
2018-06-20 21:10:14Liran Nunasetmessageid: <1529529014.65.0.56676864532.issue33918@psf.upfronthosting.co.za>
2018-06-20 21:10:14Liran Nunalinkissue33918 messages
2018-06-20 21:10:14Liran Nunacreate