I don't think unifying these is the right thing to do. The built-in TimeoutError is a subclass of OSError that represents ETIMEDOUT. This means that it can be raised for different purposes (although who knows when) and you can catch it with catching OSError. Neither of those properties should be true for asyncio.TimeoutError.
Note that asyncio.TimeoutError is an alias for concurrent.futures.TimeoutError -- but I'm not even sure this is correct -- they are raised under different circumstances and have different semantics. On Wed, Jan 29, 2014 at 7:28 AM, Andrew Svetlov <[email protected]>wrote: > There are also concurrent.futures.TimeoutError and > multiprocessing.TimeoutError > asyncio.TimeoutError is mimic to former. > > On Wed, Jan 29, 2014 at 5:21 PM, Gustavo Carneiro <[email protected]> > wrote: > > I made a mistake now of having some code catch TimeoutError, while the > Tulip > > code raises asyncio.TimeoutError, and they are not the same thing. > > > > Is there anything that can be done to improve this? Surely the builtin > > TimeoutError is good enough, or at least we should subclass it? > > > > > > -- > > Gustavo J. A. M. Carneiro > > Gambit Research LLC > > "The universe is always one step beyond logic." -- Frank Herbert > > > > -- > Thanks, > Andrew Svetlov > -- --Guido van Rossum (python.org/~guido)
