- Notifications
You must be signed in to change notification settings - Fork5.9k
Add Python 3.12 beta to test matrix#3751
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
harshil21 commentedJun 9, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
defgen():yieldawaitasyncio.create_task(gen()) does not work in python 3.12. Changing into an "asyncio.iscoroutine() now returns False for generators as asyncio does not support legacy generator-based coroutines." Does this mean we should drop support for generators in Related code and PRs: https://github.com/python/cpython/blob/main/Lib/asyncio/tasks.py#L106-L110 |
Also remove support for generators in app.create_task
Not for py 3.11-, as that would be a breach of our stability policy. We can think about deprecating it, but dropping support unannounced is a no-go. |
@Bibo-Joshi okay, now how do I specify different type hints for the and what kind of workaround do you suggest for py3.12+? I don't see any |
Sounds good if that works reasonably well. Don't know if it's possible to make only the overload part the content of the if clause or if you have to define the method twice
I don't have anything in mind TBH, haven't looked into it yet |
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.
I double checked by running mypy in different python versions, and also checked if VSCode shows a type error when passing an (async) generator toapp.create_task for py > 3.12.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
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.
Hey! Looks like you edited the (optional) requirements or the pre-commit hooks. I'm just a friendly reminder to keep the additional dependencies for the hooks in sync with the requirements :)
pre-commit.ci run |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
To be merged after#3728
Things changed for us:
__abstractmethods__to dynamically get all defined abstract methods.app.create_taskshould not accept generators. See below post