8000 GH-96704: Add task.get_context(), use it in call_exception_handler() by gvanrossum · Pull Request #96756 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-96704: Add task.get_context(), use it in call_exception_handler() #96756

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 7 commits into from
Oct 5, 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
< 8000 div class="select-menu-blankslate select-menu-error"> Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update NEWS
  • Loading branch information
gvanrossum committed Oct 4, 2022
commit d9ccfe3822a69ee370ff9cf03a5189e0fe6e165c
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Pass the correct ``contextvars.Context`` when a ``asyncio`` exception handler is called on behalf of a task. This adds a new ``Task`` method, ``get_context``. If this method is not found on a task object (perhaps because it is a third-party library that does not yet provide this method), the context prevailing at the time the exception handler is called is used.
Pass the correct ``contextvars.Context`` when a ``asyncio`` exception handler is called on behalf of a task or callback handle. This adds a new ``Task`` method, ``get_context``, and also a new ``Handle`` method with the same name. If this method is not found on a task object (perhaps because it is a third-party library that does not yet provide this method), the context prevailing at the time the exception handler is called is used.
0