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

gvanrossum

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

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

@pre-commit-ci

@gvanrossum

@github-actions

This comment has been minimized.

1 similar comment

@github-actions

This comment has been minimized.

@gvanrossum

@gvanrossum

@gvanrossum

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 )

@github-actions

This comment has been minimized.

1 similar comment

@github-actions

This comment has been minimized.

@JelleZijlstra

JelleZijlstra

@gvanrossum @JelleZijlstra

(Thanks Jelle...)

Co-authored-by: Jelle Zijlstra jelle.zijlstra@gmail.com

@gvanrossum

@github-actions

This comment has been minimized.

1 similar comment

@github-actions

This comment has been minimized.

@gvanrossum

@github-actions

This comment has been minimized.

@gvanrossum

@Akuli

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

@gvanrossum

@JelleZijlstra

I suppose we should make stubtest understand the VERSIONS file.

@github-actions

This comment has been minimized.

Akuli

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.

@AlexWaygood

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)

@gvanrossum

@pre-commit-ci

Akuli

@github-actions

This comment has been minimized.

@gvanrossum

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

1 similar comment

@github-actions

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

Akuli

@gvanrossum