Message310250
+1 on on the API and for adding it in 3.7 and for deprecating set_coroutine_wrapepr. This will simplify asyncio code and other event loops (like uvloop) and will lead to less overhead on asyncio debug mode.
I always disliked the set_coroutine_wrapper API. Even at the time when I added it to PEP 492 I understood that we'll have to replace it eventually with something more sensible.
I think we should start working on a patch. Nathaniel, do you have time to champion the work?
> Most important: what format should we use for storing the origin information? I can see three plausible approaches:
I'd be strongly against calling `traceback.StackSummary.extract` when coroutine object is created. Let's go with the option 2. You can create a list of tuple objects without the need of inventing a new struct. coroutine.cr_origin (let's have the "cr_" prefix; dropping the prefixes should be considered in a separate issue) should return that list object directly.
I'm not sure how exactly the warning print logic will work with a list of tuples in cr_origin, I propose to start working on the implementation and figure that out during the review process. |
|
Date |
User |
Action |
Args |
2018-01-18 16:28:04 | yselivanov | set | recipients:
+ yselivanov, giampaolo.rodola, njs, asvetlov |
2018-01-18 16:28:04 | yselivanov | set | messageid: <1516292884.7.0.467229070634.issue32591@psf.upfronthosting.co.za> |
2018-01-18 16:28:04 | yselivanov | link | issue32591 messages |
2018-01-18 16:28:04 | yselivanov | create | |
|