[Python-Dev] Re: Map errno==ETIME to TimeoutError

2020-05-24 Thread Eric V. Smith
On 5/24/2020 9:31 PM, Cameron Simpson wrote: What's the class hierachy here? TimeoutError is derived from OSError. So if you're catching OSError and looking for errno == ETIME, you're good. If you're catching both OSError and TimoutError, an ETIME which used to be an OSError would now be a

[Python-Dev] Re: Map errno==ETIME to TimeoutError

2020-05-24 Thread Cameron Simpson
What's the class hierachy here? I for one have some code (not specificly timeouts) of the form: try: os.something(...) except OSError as e: if e.errno == errno.EPERM: suitable action else: raise in various permutations. I have the vague feeling

[Python-Dev] Map errno==ETIME to TimeoutError

2020-05-24 Thread Eric V. Smith
Does anyone have an opinion on https://bugs.python.org/issue39673? It maps ETIME to TimeoutError, in addition to the already existing ETIMEDOUT. http://man7.org/linux/man-pages/man3/errno.3.html says: *ETIME *Timer expired (POSIX.1 (XSI STREAMS option)). (POSIX.1

[Python-Dev] Re: Map errno==ETIME to TimeoutError

2020-05-24 Thread Gregory P. Smith
Sounds like a natural fit, I'd just do it for 3.10. On Sun, May 24, 2020, 9:45 AM Eric V. Smith wrote: > Does anyone have an opinion on https://bugs.python.org/issue39673? It > maps ETIME to TimeoutError, in addition to the already existing ETIMEDOUT. > >