FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add asyncio.taskgroups and new Task methods by gvanrossum · Pull Request #7240 · python/typeshed · GitHub

Repository navigation

Add asyncio.taskgroups and new Task methods - #7240

Merged
Akuli merged 15 commits into
masterfrom
taskgroups
Feb 16, 2022
Merged

Akuli merged 15 commits into
masterfrom
taskgroups

Conversation

Copy link
Copy Markdown
Member

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).

gvanrossum and others added 3 commits February 16, 2022 10:34
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.

Copy link
Copy Markdown
Member Author

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.

(@srittau @JelleZijlstra )

This comment has been minimized.

1 similar comment

This comment has been minimized.

Copy link
Copy Markdown
Member

You need to add it to the VERSIONS file, https://github.com/python/typeshed/blob/master/stdlib/VERSIONS

Comment thread stdlib/asyncio/taskgroups.pyi Outdated
gvanrossum and others added 2 commits February 16, 2022 11:40
(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.

Copy link
Copy Markdown
Member Author

These test failures are excruciating if you haven't been following developments here. :-)

I now get "error: asyncio.taskgroups failed to find stubs" e.g. https://github.com/python/typeshed/runs/5222298476?check_suite_focus=true

I'm not sure what it's telling me I have to do. :-(

Akuli commented Feb 16, 2022

Copy link
Copy Markdown
Collaborator

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/.

Copy link
Copy Markdown
Member

I suppose we should make stubtest understand the VERSIONS file.

This comment has been minimized.

Akuli left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

A few comments below. Unfortunately our CI isn't very helpful, because we don't run the tests on Python 3.11 yet.

Comment thread stdlib/asyncio/taskgroups.pyi Outdated
Comment thread stdlib/asyncio/taskgroups.pyi Outdated
Comment thread stdlib/asyncio/taskgroups.pyi Outdated
Comment thread stdlib/asyncio/taskgroups.pyi Outdated

Copy link
Copy Markdown
Member

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)

Comment thread stdlib/asyncio/taskgroups.pyi Outdated

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

1 similar comment

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Akuli merged commit 35bddd2 into master Feb 16, 2022
Akuli deleted the taskgroups branch February 16, 2022 22:32

Copy link
Copy Markdown
Member Author

Thanks!

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL