clean python 3 specific stuff from stdlib/@python2 stubs (#5451)

This commit is contained in:
Akuli
2021-05-15 01:19:05 +03:00
committed by GitHub
parent f94d838814
commit 5ec4f06263
121 changed files with 1024 additions and 4801 deletions

View File

@@ -28,10 +28,7 @@ def select(
__rlist: Iterable[Any], __wlist: Iterable[Any], __xlist: Iterable[Any], __timeout: Optional[float] = ...
) -> Tuple[List[Any], List[Any], List[Any]]: ...
if sys.version_info >= (3, 3):
error = OSError
else:
class error(Exception): ...
class error(Exception): ...
if sys.platform != "linux" and sys.platform != "win32":
# BSD only
@@ -103,18 +100,7 @@ if sys.platform != "linux" and sys.platform != "win32":
if sys.platform == "linux":
class epoll(object):
if sys.version_info >= (3, 3):
def __init__(self, sizehint: int = ..., flags: int = ...) -> None: ...
else:
def __init__(self, sizehint: int = ...) -> None: ...
if sys.version_info >= (3, 4):
def __enter__(self) -> epoll: ...
def __exit__(
self,
exc_type: Optional[Type[BaseException]] = ...,
exc_val: Optional[BaseException] = ...,
exc_tb: Optional[TracebackType] = ...,
) -> None: ...
def __init__(self, sizehint: int = ...) -> None: ...
def close(self) -> None: ...
closed: bool
def fileno(self) -> int: ...
@@ -137,16 +123,3 @@ if sys.platform == "linux":
EPOLLWRBAND: int
EPOLLWRNORM: int
EPOLL_RDHUP: int
if sys.platform != "linux" and sys.platform != "darwin" and sys.platform != "win32":
if sys.version_info >= (3, 3):
# Solaris only
class devpoll:
if sys.version_info >= (3, 4):
def close(self) -> None: ...
closed: bool
def fileno(self) -> int: ...
def register(self, fd: FileDescriptorLike, eventmask: int = ...) -> None: ...
def modify(self, fd: FileDescriptorLike, eventmask: int = ...) -> None: ...
def unregister(self, fd: FileDescriptorLike) -> None: ...
def poll(self, timeout: Optional[float] = ...) -> List[Tuple[int, int]]: ...