Add asyncio.taskgroups and new Task methods by gvanrossum · Pull Request #7240 · python/typeshed (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation29 Commits15 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
The new Task methods are .cancelling() and .uncancel().
Everything is conditional to 3.11 (but the taskgroups.py module
always exists -- it's just empty before 3.11).
The new Task methods are .cancelling() and .uncancel().
Everything is conditional to 3.11 (but the taskgroups.py module always exists -- it's just empty before 3.11).
This comment has been minimized.
1 similar comment
This comment has been minimized.
Question for other typeshed maintainers. How do we handle modules that were added in a certain release? I am getting errors from the linters that seem to be complaining about this.
This comment has been minimized.
1 similar comment
This comment has been minimized.
(Thanks Jelle...)
Co-authored-by: Jelle Zijlstra jelle.zijlstra@gmail.com
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
stubtest
is a tool that imports the module and compares it to stubs. Because asyncio.taskgroups
can't actually be imported before 3.11, you need to suppress the error by adding a line asyncio.taskgroups
to py36.txt
, py37.txt
etc in tests/stubtest_allowlists/
.
I suppose we should make stubtest understand the VERSIONS file.
This comment has been minimized.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments below. Unfortunately our CI isn't very helpful, because we don't run the tests on Python 3.11 yet.
I suppose we should make stubtest understand the VERSIONS file.
I believe that should already be fixed in the next version of mypy (python/mypy#12083)
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉