Skip to content

GH-94398: TaskGroup: Fail create_task() during shutdown #94400

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

Merged
merged 38 commits into from
Jun 30, 2022

Conversation

gvanrossum
Copy link
Member

@gvanrossum gvanrossum commented Jun 29, 2022

Once the task group is shutting down,
it should not be possible to create a new task.
Here "shutting down" means self._aborting is set,
indicating that at least one task has failed and we have
cancelled all others.

Once the task group is shutting down,
it should not be possible to create a new task.
Here "shutting down" means `self._aborting` is set,
indicating that at least one task has failed and we have
cancelled all others.
@gvanrossum
Copy link
Member Author

I could really use a core dev review here. @1st1 do you have time? The idea is pretty simple (see the issue, GH-94398).

@gvanrossum
Copy link
Member Author

@ambv feel like reviewing this? Pablo thought it would make a nice addition to the (still stuck) beta.

@ambv
Copy link
Contributor

ambv commented Jun 30, 2022

Looking.

@gvanrossum
Copy link
Member Author

Thanks, let me see if I can add something to the now-existing TaskGroup docs about these semantics.

terryjreedy and others added 10 commits June 30, 2022 09:39
0. Update text start and stop conditions.
1. Title-case sections but not subsections.
2. Edit Shell Window sections: title, execute, restart.
…honGH-94347)

Three test cases were failing on FreeBSD with latest OpenSSL.
…ythonGH-94200)

Remove the pure Python implementation of hashlib.pbkdf2_hmac(),
deprecated in Python 3.10. Python 3.10 and newer requires OpenSSL
1.1.1 or newer (PEP 644), this OpenSSL version provides a C
implementation of pbkdf2_hmac() which is faster.
…honGH-94040)

Closes python#94018.

Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
@gvanrossum
Copy link
Member Author

Sorry for the git mess. I really just merged main (twice, apparently) and added one line to the documentation: 5b9817d

@ambv ambv merged commit 594c369 into python:main Jun 30, 2022
@miss-islington
Copy link
Contributor

Thanks @gvanrossum for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 30, 2022
…GH-94400)

Once the task group is shutting down, it should not be possible to create a new task.
Here "shutting down" means `self._aborting` is set, indicating that at least one task
has failed and we have cancelled all others.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 594c369)

Co-authored-by: Guido van Rossum <guido@python.org>
@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Jun 30, 2022
@bedevere-bot
Copy link

GH-94463 is a backport of this pull request to the 3.11 branch.

ambv pushed a commit that referenced this pull request Jun 30, 2022
…H-94463)

Once the task group is shutting down, it should not be possible to create a new task.
Here "shutting down" means `self._aborting` is set, indicating that at least one task
has failed and we have cancelled all others.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 594c369)

Co-authored-by: Guido van Rossum <guido@python.org>
@gvanrossum gvanrossum deleted the task-group-abort branch August 7, 2022 15:51
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.