
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2019-05-24 14:32 byasvetlov, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 13548 | merged | asvetlov,2019-05-24 15:11 | |
| PR 13594 | merged | asvetlov,2019-05-27 14:27 | |
| Messages (4) | |||
|---|---|---|---|
| msg343389 -(view) | Author: Andrew Svetlov (asvetlov)*![]() | Date: 2019-05-24 14:32 | |
Currently asyncio uses `loop.call_exception_handler()` for logging *fatal* exceptions from underlying sockets before calling protocol.connection_lost().There is a list of exceptions that are not logged: BrokenPipeError,ConnectionResetError, ConnectionAbortedErrorLater ssl.SSLCertVerificationError was added.There is a request to skip TimeoutError as well:#34148aiohttp has a bug report about logging SSLError:https://github.com/aio-libs/aiohttp/issues/3535I am pretty sure that the network subsystem can raise other exceptions that users don't want to see in logs.I suggest changing suppression logic to skip logging of *all* OSError exceptions and eliminate _FATAL_ERROR_IGNORE list.OSError is a sign of communication over network to peer, these problems cannot be avoided by fixing a program logic.All other exceptions are indicators for programming errors, the user's source code should be fixed to get rid of such problems (e.g. AttributeError raised by protocol callback etc). Logging non-OSErrors is pretty nice and desired feature. Note, the list now contains OSError derived exceptions only, both TimeoutError and SSLError falls into this category too.Not-logged exceptions are not skipped but reported to the user by protocol.connection_lost(exc) callback.User code can (and should) handle them properly.The fix is very simple, and don't change application logic.It can be backported to 3.7 as well. | |||
| msg343390 -(view) | Author: Andrew Svetlov (asvetlov)*![]() | Date: 2019-05-24 14:35 | |
Update.Currently, exceptions from the ignore list are still logged in debug mode. The proposal doesn't change this behavior. | |||
| msg343623 -(view) | Author: miss-islington (miss-islington) | Date: 2019-05-27 13:28 | |
New changeset1f39c28e489cca0397fc4c3675d13569318122ac by Miss Islington (bot) (Andrew Svetlov) in branch 'master':bpo-37035: Don't log OSError (GH-13548)https://github.com/python/cpython/commit/1f39c28e489cca0397fc4c3675d13569318122ac | |||
| msg343651 -(view) | Author: Andrew Svetlov (asvetlov)*![]() | Date: 2019-05-27 15:52 | |
New changeseta79b6c578fcd2ea8be29440fdd8a998e5527200f by Andrew Svetlov in branch '3.7':[3.7]bpo-37035: Don't log OSError (GH-13548) (#13594)https://github.com/python/cpython/commit/a79b6c578fcd2ea8be29440fdd8a998e5527200f | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:15 | admin | set | github: 81216 |
| 2019-10-13 03:56:22 | Harmon758 | set | nosy: +Harmon758 |
| 2019-06-17 11:40:59 | asvetlov | link | issue34506 superseder |
| 2019-05-27 15:52:27 | asvetlov | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2019-05-27 15:52:08 | asvetlov | set | messages: +msg343651 |
| 2019-05-27 14:27:54 | asvetlov | set | pull_requests: +pull_request13501 |
| 2019-05-27 13:47:27 | asvetlov | link | issue34148 superseder |
| 2019-05-27 13:28:37 | miss-islington | set | nosy: +miss-islington messages: +msg343623 |
| 2019-05-24 15:11:49 | asvetlov | set | keywords: +patch stage: patch review pull_requests: +pull_request13460 |
| 2019-05-24 14:35:41 | asvetlov | set | messages: +msg343390 |
| 2019-05-24 14:32:57 | asvetlov | create | |