Message310355
Guido,
I'd like to go forward with this and merge Nathaniel's PR.
Quick summary:
* This issue adds new APIs: a sys.set_coroutine_origin_tracking_depth(depth) function and a 'cr_origin' property to native coroutine objects.
* By using this APIs, users can opt-in to save traceback (serialized as tuples of `(funcname, filename, line)`) of where native coroutines are created.
* This allows us to deprecate the sys.set_coroutine_wrapper function, which I never liked. It's too powerful as it allows anyone to intercept/override native coroutine construction logic.
* In turn, we are removing a lot of complexity from asyncio code: starting with 3.7 we'll use CoroWrapper only for generator-based corotuines; at some point (Python 3.9?) when we remove @asyncio.coroutine we'll be able to remove CoroWrapper. This will also make asyncio debug mode quite a bit faster, allowing people to use it in production.
* Finally, sys.set_coroutine_wrapper was always documented as a debug-only API that might disappear in future CPython releases. We'll deprecate it in 3.7 and remove it in 3.8.
Are you OK with this? |
|
Date |
User |
Action |
Args |
2018-01-20 16:12:00 | yselivanov | set | recipients:
+ yselivanov, gvanrossum, giampaolo.rodola, njs, asvetlov |
2018-01-20 16:11:59 | yselivanov | set | messageid: <1516464719.99.0.467229070634.issue32591@psf.upfronthosting.co.za> |
2018-01-20 16:11:59 | yselivanov | link | issue32591 messages |
2018-01-20 16:11:59 | yselivanov | create | |
|