-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-79940: add introspection API for asynchronous generators #11590
Conversation
@1st1 This PR is open for some time now, is it still considered? Also, it appears that the CI/CD pipeline got stuck, the Ubuntu & Windows status is in limbo |
Rebased this branch onto main and adapted docs and unit tests for Python 3.11 |
37a7c35
to
cdedc91
Compare
The functions inspect.getasyncgenstate and inspect.getasyncgenlocals allow to determine the current state of asynchronous generators and mirror the introspection API for generators and coroutines.
cdedc91
to
bca9939
Compare
Rebased this branch onto main and adapted docs and unit tests for Python 3.12 Following additional changes:
|
Adapting
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for working on this!
|
|
|
Buildbot wasm32 worker seem to be unhappy, asyncio loop initialization fails now in |
Skip `TestGetAsyncGenState` and restoring of the default event loop policy in `test_inspect` if platform lacks working socket support. Fixes python#11590
Skip `TestGetAsyncGenState` and restoring of the default event loop policy in `test_inspect` if platform lacks working socket support. Fixes python#11590
Skip `TestGetAsyncGenState` and restoring of the default event loop policy in `test_inspect` if platform lacks working socket support. Fixes python#11590
…rking sockets (pythonGH-102605) Skip `TestGetAsyncGenState` and restoring of the default event loop policy in `test_inspect` if platform lacks working socket support. Fixes python#11590 Automerge-Triggered-By: GH:kumaraditya303
The
inspect
module does not contain functions for determining the current state of asynchronous generators. That is, there is no introspection API for asynchronous generators that match the API for generators and coroutines: https://docs.python.org/3.8/library/inspect.html#current-state-of-generators-and-coroutines.The functions
inspect.getasyncgenstate
andinspect.getasyncgenlocals
allow to determine the current state of asynchronous generators and mirror the introspection API for generators and coroutines.https://bugs.python.org/issue35759
https://bugs.python.org/issue35759