This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients alex, asvetlov, bquinlan, christian.heimes, corona10, davin, dstufft, janssen, miss-islington, pitrou, serhiy.storchaka, vstinner, yselivanov
Date 2020-11-23.09:45:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
IMHO it's ok that exc.errno is None. It doesn't prevent to write code like:

except OSError as exc:
    if exc.errno == ...:

In the early days (first 5 years? :-D) of the asyncio documentation, TimeoutError was documented just as "TimeoutError", instead of "asyncio.TimeoutError". So if you followed carefully the asyncio documentation and wrote "except TimeoutError:", the except would never be reached beause asyncio.TimeoutError is *not* a subclass of the builtin Timeout...

>>> issubclass(asyncio.TimeoutError, TimeoutError)

It would be great to have a single TimeoutError class. I'm fine with having weird attributes depending who raise the exception. Honestly, in most cases "except TimeoutError:" is enough: there is no need to check for exception attributes.
Date User Action Args
2020-11-23 09:45:38vstinnersetrecipients: + vstinner, bquinlan, janssen, pitrou, christian.heimes, alex, asvetlov, serhiy.storchaka, yselivanov, dstufft, davin, corona10, miss-islington
2020-11-23 09:45:38vstinnersetmessageid: <>
2020-11-23 09:45:38vstinnerlinkissue42413 messages
2020-11-23 09:45:38vstinnercreate