Skip to content
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

bpo-46752: Slight improvements to TaskGroup API #31398

Merged
merged 3 commits into from
Feb 18, 2022

Conversation

gvanrossum
Copy link
Member

@gvanrossum gvanrossum commented Feb 17, 2022

  • Remove the optional name argument to the TaskGroup constructor
  • Add an optional name argument to the create_task() method
  • Some cleanup

Note that there's a big discussion on cancellation edge cases going on in bpo-46771, this is unrelated to that and uncontroversial.

I'll also update typeshed.

https://bugs.python.org/issue46752

We're not sure that they are needed, and once in the code
we would never be able to get rid of them.

Yury wrote:

> Ideally, there should be a way for someone to build a "trace"
> of taskgroups/task leading to the current running task.
> We could do that using contextvars, but I'm not sure we should
> do that in 3.11.
@gvanrossum gvanrossum merged commit d851216 into python:main Feb 18, 2022
@gvanrossum gvanrossum deleted the rm-tg-name branch February 18, 2022 05:30
gvanrossum added a commit to python/typeshed that referenced this pull request Feb 18, 2022
* Remove TaskGroup name arg and get_name() method

(We removed those from the implementation.)

* Add optional name arg to create_task()

See python/cpython#31398
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants