diff --git a/stdlib/2and3/threading.pyi b/stdlib/2and3/threading.pyi index 6d0e4a69d..eb89a2749 100644 --- a/stdlib/2and3/threading.pyi +++ b/stdlib/2and3/threading.pyi @@ -37,8 +37,7 @@ def stack_size(size: int = ...) -> int: ... if sys.version_info >= (3,): TIMEOUT_MAX = ... # type: int -if sys.version_info < (3,): - class ThreadError(Exception): ... +class ThreadError(Exception): ... # TODO: Change to a class with __getattr__ and __setattr__ diff --git a/stdlib/2and3/zipfile.pyi b/stdlib/2and3/zipfile.pyi index 5a504e35a..f45472ee7 100644 --- a/stdlib/2and3/zipfile.pyi +++ b/stdlib/2and3/zipfile.pyi @@ -14,6 +14,7 @@ if sys.version_info >= (3,): BadZipfile = BadZipFile else: class BadZipfile(Exception): ... +error = BadZipfile class LargeZipFile(Exception): ... diff --git a/stdlib/2and3/zlib.pyi b/stdlib/2and3/zlib.pyi index 34aaf1b09..3300f5166 100644 --- a/stdlib/2and3/zlib.pyi +++ b/stdlib/2and3/zlib.pyi @@ -22,20 +22,20 @@ if sys.version_info >= (3,): class error(Exception): ... -class Compress: +class _Compress: def compress(self, data: bytes) -> bytes: ... def flush(self, mode: int = ...) -> bytes: ... - def copy(self) -> "Compress": ... + def copy(self) -> _Compress: ... -class Decompress: +class _Decompress: unused_data = ... # type: bytes unconsumed_tail = ... # type: bytes if sys.version_info >= (3,): eof = ... # type: bool def decompress(self, data: bytes, max_length: int = ...) -> bytes: ... def flush(self, length: int = ...) -> bytes: ... - def copy(self) -> "Decompress": ... + def copy(self) -> _Decompress: ... def adler32(data: bytes, value: int = ...) -> int: ... @@ -43,13 +43,13 @@ def compress(data: bytes, level: int = ...) -> bytes: ... if sys.version_info >= (3,): def compressobj(level: int = ..., method: int = ..., wbits: int = ..., memLevel: int = ..., strategy: int = ..., - zdict: bytes = ...) -> Compress: ... + zdict: bytes = ...) -> _Compress: ... else: def compressobj(level: int = ..., method: int = ..., wbits: int = ..., - memlevel: int = ..., strategy: int = ...) -> Compress: ... + memlevel: int = ..., strategy: int = ...) -> _Compress: ... def crc32(data: bytes, value: int = ...) -> int: ... def decompress(data: bytes, wbits: int = ..., bufsize: int = ...) -> bytes: ... if sys.version_info >= (3,): - def decompressobj(wbits: int = ..., zdict: bytes = ...) -> Decompress: ... + def decompressobj(wbits: int = ..., zdict: bytes = ...) -> _Decompress: ... else: - def decompressobj(wbits: int = ...) -> Decompress: ... + def decompressobj(wbits: int = ...) -> _Decompress: ...