mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Use builtin TimeoutError in asyncio and concurrent.futures (#11109)
related to https://github.com/python/typeshed/issues/3968 Co-authored-by: Stephen Morton <git@tungol.org>
This commit is contained in:
@@ -21,7 +21,12 @@ else:
|
||||
)
|
||||
|
||||
class CancelledError(BaseException): ...
|
||||
class TimeoutError(Exception): ...
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
from builtins import TimeoutError as TimeoutError
|
||||
else:
|
||||
class TimeoutError(Exception): ...
|
||||
|
||||
class InvalidStateError(Exception): ...
|
||||
class SendfileNotAvailableError(RuntimeError): ...
|
||||
|
||||
|
||||
@@ -24,7 +24,11 @@ LOGGER: Logger
|
||||
|
||||
class Error(Exception): ...
|
||||
class CancelledError(Error): ...
|
||||
class TimeoutError(Error): ...
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
from builtins import TimeoutError as TimeoutError
|
||||
else:
|
||||
class TimeoutError(Error): ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
class InvalidStateError(Error): ...
|
||||
|
||||
Reference in New Issue
Block a user