Message320546
> 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. |
|
Date |
User |
Action |
Args |
2018-06-27 06:04:55 | Liran Nuna | set | recipients:
+ Liran Nuna, asvetlov, yselivanov |
2018-06-27 06:04:55 | Liran Nuna | set | messageid: <1530079495.66.0.56676864532.issue33918@psf.upfronthosting.co.za> |
2018-06-27 06:04:55 | Liran Nuna | link | issue33918 messages |
2018-06-27 06:04:55 | Liran Nuna | create | |
|