diff options
author | monster <monster@ydb.tech> | 2022-07-07 14:41:37 +0300 |
---|---|---|
committer | monster <monster@ydb.tech> | 2022-07-07 14:41:37 +0300 |
commit | 06e5c21a835c0e923506c4ff27929f34e00761c2 (patch) | |
tree | 75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /contrib/tools/python3/src/Lib/asyncio/exceptions.py | |
parent | 03f024c4412e3aa613bb543cf1660176320ba8f4 (diff) | |
download | ydb-06e5c21a835c0e923506c4ff27929f34e00761c2.tar.gz |
fix ya.make
Diffstat (limited to 'contrib/tools/python3/src/Lib/asyncio/exceptions.py')
-rw-r--r-- | contrib/tools/python3/src/Lib/asyncio/exceptions.py | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/contrib/tools/python3/src/Lib/asyncio/exceptions.py b/contrib/tools/python3/src/Lib/asyncio/exceptions.py deleted file mode 100644 index f07e4486577..00000000000 --- a/contrib/tools/python3/src/Lib/asyncio/exceptions.py +++ /dev/null @@ -1,58 +0,0 @@ -"""asyncio exceptions.""" - - -__all__ = ('CancelledError', 'InvalidStateError', 'TimeoutError', - 'IncompleteReadError', 'LimitOverrunError', - 'SendfileNotAvailableError') - - -class CancelledError(BaseException): - """The Future or Task was cancelled.""" - - -class TimeoutError(Exception): - """The operation exceeded the given deadline.""" - - -class InvalidStateError(Exception): - """The operation is not allowed in this state.""" - - -class SendfileNotAvailableError(RuntimeError): - """Sendfile syscall is not available. - - Raised if OS does not support sendfile syscall for given socket or - file type. - """ - - -class IncompleteReadError(EOFError): - """ - Incomplete read error. Attributes: - - - partial: read bytes string before the end of stream was reached - - expected: total number of expected bytes (or None if unknown) - """ - def __init__(self, partial, expected): - r_expected = 'undefined' if expected is None else repr(expected) - super().__init__(f'{len(partial)} bytes read on a total of ' - f'{r_expected} expected bytes') - self.partial = partial - self.expected = expected - - def __reduce__(self): - return type(self), (self.partial, self.expected) - - -class LimitOverrunError(Exception): - """Reached the buffer limit while looking for a separator. - - Attributes: - - consumed: total number of to be consumed bytes. - """ - def __init__(self, message, consumed): - super().__init__(message) - self.consumed = consumed - - def __reduce__(self): - return type(self), (self.args[0], self.consumed) |