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-27.06:04:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1530079495.66.0.56676864532.issue33918@psf.upfronthosting.co.za>
In-reply-to
Content
> That's still doable with contextvars. You just need a custom mock-like object (or library) that stores its settings/state in a context variable.

contextvars only work with asyncio, what about the iterator case?

In addition, you can't possibly expect authors to re-implement a library just because it may or may not be used with asyncio. In my example, re-implementing mock/patch is quite a task just to get such basic functionality.

In other words, contextvars don't solve this issue, it just creates new issues to solve and causes code duplication.
History
Date User Action Args
2018-06-27 06:04:55Liran Nunasetrecipients: + Liran Nuna, asvetlov, yselivanov
2018-06-27 06:04:55Liran Nunasetmessageid: <1530079495.66.0.56676864532.issue33918@psf.upfronthosting.co.za>
2018-06-27 06:04:55Liran Nunalinkissue33918 messages
2018-06-27 06:04:55Liran Nunacreate