8000 bpo-46994: Accept explicit contextvars.Context in asyncio create_task() API by asvetlov · Pull Request #31837 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-46994: Accept explicit contextvars.Context in asyncio create_task() API #31837

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 9 commits into from
Mar 14, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix typo
  • Loading branch information
asvetlov committed Mar 13, 2022
commit 7a9bdede3486dde1141cec5751dd9f593ace588e
2 changes: 1 addition & 1 deletion Lib/asyncio/taskgroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def create_task(self, coro, *, name=None, context=None):
raise RuntimeError(f"TaskGroup {self!r} has not been entered")
if self._exiting and self._unfinished_tasks == 0:
raise RuntimeError(f"TaskGroup {self!r} is finished")
if cotext is None:
if context is None:
task = self._loop.create_task(coro)
else:
task = self._loop.create_task(coro, context=context)
Expand Down
0