Drop Python 3.3 support from several stubs (#2265)

* Drop Python 3.3 support from several stubs

* Revert wrong socketserver changes
This commit is contained in:
Sebastian Rittau
2018-06-21 01:49:47 +02:00
committed by Jelle Zijlstra
parent b05e99297c
commit 95eff73ab2
11 changed files with 138 additions and 296 deletions

View File

@@ -334,23 +334,14 @@ class bytes(ByteString):
def __init__(self, o: SupportsBytes) -> None: ...
def capitalize(self) -> bytes: ...
def center(self, width: int, fillchar: bytes = ...) -> bytes: ...
if sys.version_info >= (3, 3):
def count(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
else:
def count(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
def count(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
def decode(self, encoding: str = ..., errors: str = ...) -> str: ...
def endswith(self, suffix: Union[bytes, Tuple[bytes, ...]]) -> bool: ...
def expandtabs(self, tabsize: int = ...) -> bytes: ...
if sys.version_info >= (3, 3):
def find(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
else:
def find(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
def find(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
if sys.version_info >= (3, 5):
def hex(self) -> str: ...
if sys.version_info >= (3, 3):
def index(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
else:
def index(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
def index(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
def isalnum(self) -> bool: ...
def isalpha(self) -> bool: ...
def isdigit(self) -> bool: ...
@@ -364,14 +355,8 @@ class bytes(ByteString):
def lstrip(self, chars: Optional[bytes] = ...) -> bytes: ...
def partition(self, sep: bytes) -> Tuple[bytes, bytes, bytes]: ...
def replace(self, old: bytes, new: bytes, count: int = ...) -> bytes: ...
if sys.version_info >= (3, 3):
def rfind(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
else:
def rfind(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
if sys.version_info >= (3, 3):
def rindex(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
else:
def rindex(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
def rfind(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
def rindex(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
def rjust(self, width: int, fillchar: bytes = ...) -> bytes: ...
def rpartition(self, sep: bytes) -> Tuple[bytes, bytes, bytes]: ...
def rsplit(self, sep: Optional[bytes] = ..., maxsplit: int = ...) -> List[bytes]: ...
@@ -425,24 +410,15 @@ class bytearray(MutableSequence[int], ByteString):
def __init__(self) -> None: ...
def capitalize(self) -> bytearray: ...
def center(self, width: int, fillchar: bytes = ...) -> bytearray: ...
if sys.version_info >= (3, 3):
def count(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
else:
def count(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
def count(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
def copy(self) -> bytearray: ...
def decode(self, encoding: str = ..., errors: str = ...) -> str: ...
def endswith(self, suffix: bytes) -> bool: ...
def expandtabs(self, tabsize: int = ...) -> bytearray: ...
if sys.version_info >= (3, 3):
def find(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
else:
def find(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
def find(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
if sys.version_info >= (3, 5):
def hex(self) -> str: ...
if sys.version_info >= (3, 3):
def index(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
else:
def index(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
def index(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
def insert(self, index: int, object: int) -> None: ...
def isalnum(self) -> bool: ...
def isalpha(self) -> bool: ...
@@ -457,14 +433,8 @@ class bytearray(MutableSequence[int], ByteString):
def lstrip(self, chars: Optional[bytes] = ...) -> bytearray: ...
def partition(self, sep: bytes) -> Tuple[bytearray, bytearray, bytearray]: ...
def replace(self, old: bytes, new: bytes, count: int = ...) -> bytearray: ...
if sys.version_info >= (3, 3):
def rfind(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
else:
def rfind(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
if sys.version_info >= (3, 3):
def rindex(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
else:
def rindex(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
def rfind(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
def rindex(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
def rjust(self, width: int, fillchar: bytes = ...) -> bytearray: ...
def rpartition(self, sep: bytes) -> Tuple[bytearray, bytearray, bytearray]: ...
def rsplit(self, sep: Optional[bytes] = ..., maxsplit: int = ...) -> List[bytearray]: ...
@@ -985,8 +955,7 @@ class OSError(Exception):
strerror = ... # type: str
# filename, filename2 are actually Union[str, bytes, None]
filename = ... # type: Any
if sys.version_info >= (3, 4):
filename2 = ... # type: Any
filename2 = ... # type: Any
IOError = OSError
EnvironmentError = OSError
class WindowsError(OSError):
@@ -1000,9 +969,8 @@ class BufferError(Exception): ...
class EOFError(Exception): ...
class FloatingPointError(ArithmeticError): ...
class ImportError(Exception):
if sys.version_info >= (3, 3):
name = ... # type: str
path = ... # type: str
name = ... # type: str
path = ... # type: str
if sys.version_info >= (3, 6):
class ModuleNotFoundError(ImportError): ...
class IndexError(LookupError): ...