Antoine Pitrou added the comment:
Gasp. Perhaps concurrent.futures.TimeoutError can inherit from the standard
TimeoutError? The following patch doesn't seem to disrupt the test suite:
diff --git a/Lib/concurrent/futures/_base.py b/Lib/concurrent/futures/_base.py
--- a/Lib/concurrent/futures/_base.py
+++ b/Lib/concurrent/futures/_base.py
@@ -49,7 +49,7 @@ class CancelledError(Error):
"""The Future was cancelled."""
pass
-class TimeoutError(Error):
+class TimeoutError(Error, TimeoutError):
"""The operation exceeded the given deadline."""
pass
----------
assignee: docs@python ->
components: +Library (Lib)
nosy: +giampaolo.rodola, gvanrossum, haypo, pitrou, yselivanov
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue21376>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com