loop.call_exception_handler documentation is lacking
| BPO | 42347 |
|---|---|
| Nosy | @asvetlov, @1st1, @sersorrel |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = None
created_at = <Date 2020-11-13.14:54:33.611>
labels = ['type-feature', 'docs', 'expert-asyncio']
title = 'loop.call_exception_handler documentation is lacking'
updated_at = <Date 2020-11-28.10:56:22.787>
user = 'https://github.com/sersorrel'
bugs.python.org fields:
activity = <Date 2020-11-28.10:56:22.787>
actor = 'asvetlov'
assignee = 'docs@python'
closed = False
closed_date = None
closer = None
components = ['Documentation', 'asyncio']
creation = <Date 2020-11-13.14:54:33.611>
creator = 'sorrel'
dependencies = []
files = []
hgrepos = []
issue_num = 42347
keywords = []
message_count = 3.0
messages = ['380895', '381887', '381991']
nosy_count = 4.0
nosy_names = ['asvetlov', 'docs@python', 'yselivanov', 'sorrel']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue42347'
versions = []
The call_exception_handler documentation lists seven permissible context keys, but the docstring lists nine, and there are two keys referred to in the default_exception_handler implementation that aren't listed in either.
The docstring (but not the documentation) mentions "task" ("Task instance") and "asyncgen" ("Asynchronous generator that caused the exception."), though at least "asyncgen" doesn't appear to be used in any exception handler in stdlib as far as I can tell. No documentation mentions "source_traceback" or "handle_traceback", but they're used by the default exception handler and are also provided by e.g. aiohttp: https://github.com/aio-libs/aiohttp/blob/a8d9ec3f1667463e80545b1cacc7833d1ff305e9/aiohttp/client_reqrep.py#L750
Pull Request is welcome!
Partially addressed by https://github.com/python/cpython/pull/21735