Eric V. Smith <[email protected]> added the comment:
> These are both timeout errors but only `ETIMEDOUT` is accounted for?
Yes, only ETIMEDOUT is accounted for in Objects/exceptions.c. There's precedent
for mapping multiple errnos to the same exception:
ADD_ERRNO(BlockingIOError, EAGAIN);
ADD_ERRNO(BlockingIOError, EALREADY);
ADD_ERRNO(BlockingIOError, EINPROGRESS);
ADD_ERRNO(BlockingIOError, EWOULDBLOCK);
You should probably raise this on python-ideas. I don't know if ETIME has some
other accepted meaning. It's not mapped to any other exception, so it could be
easily added. The only thing it would affect are people who are catching
OSError and TimeoutError and are expecting ETIME to give an OSError, which
seems a pretty niche case. Or I guess people who only catch TimeoutError and
want to not catch the case where errno==ETIME.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue39673>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com