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 ncoghlan
Recipients ncoghlan, syncosmic, yselivanov
Date 2017-08-19.11:15:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1503141312.41.0.263499260177.issue31230@psf.upfronthosting.co.za>
In-reply-to
Content
I started a local PR at https://github.com/ncoghlan/cpython/pull/1/files to explore what this might look like in practice.

I think that what I've done so far shows that generic __frame__ and __running__ attributes would be sufficient to extend the inspect module's state introspection support to also cover async generators, while also allowing for the soft (i.e. documentation only) deprecation of the generator and coroutine specific variants of those APIs.

Issue 31183 already showed the potential value of a __code__ attribute, since it would allow all of the asynchronous operations to be handled by the same code path that already handles functions.

I'm less sure about __delegated_to__/__returns_to__, since we don't have *any* code in the standard library that reads gi_yieldfrom, and the only code that reads cr_await is a Python 3.5 compatibility hack in asyncio.
History
Date User Action Args
2017-08-19 11:15:12ncoghlansetrecipients: + ncoghlan, yselivanov, syncosmic
2017-08-19 11:15:12ncoghlansetmessageid: <1503141312.41.0.263499260177.issue31230@psf.upfronthosting.co.za>
2017-08-19 11:15:12ncoghlanlinkissue31230 messages
2017-08-19 11:15:12ncoghlancreate