fix renamed Python 2 modules (#5450)

This commit is contained in:
Jelle Zijlstra
2021-05-14 14:36:00 -07:00
committed by GitHub
parent 5afd250792
commit a47ee3245a
3 changed files with 2 additions and 183 deletions

View File

@@ -1,52 +0,0 @@
import sys
from threading import Condition, Lock
from typing import Any, Generic, Optional, TypeVar
if sys.version_info >= (3, 9):
from types import GenericAlias
_T = TypeVar("_T")
class Empty(Exception): ...
class Full(Exception): ...
class Queue(Generic[_T]):
maxsize: int
mutex: Lock # undocumented
not_empty: Condition # undocumented
not_full: Condition # undocumented
all_tasks_done: Condition # undocumented
unfinished_tasks: int # undocumented
queue: Any # undocumented
def __init__(self, maxsize: int = ...) -> None: ...
def _init(self, maxsize: int) -> None: ...
def empty(self) -> bool: ...
def full(self) -> bool: ...
def get(self, block: bool = ..., timeout: Optional[float] = ...) -> _T: ...
def get_nowait(self) -> _T: ...
def _get(self) -> _T: ...
def put(self, item: _T, block: bool = ..., timeout: Optional[float] = ...) -> None: ...
def put_nowait(self, item: _T) -> None: ...
def _put(self, item: _T) -> None: ...
def join(self) -> None: ...
def qsize(self) -> int: ...
def _qsize(self) -> int: ...
def task_done(self) -> None: ...
if sys.version_info >= (3, 9):
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
class PriorityQueue(Queue[_T]): ...
class LifoQueue(Queue[_T]): ...
if sys.version_info >= (3, 7):
class SimpleQueue(Generic[_T]):
def __init__(self) -> None: ...
def empty(self) -> bool: ...
def get(self, block: bool = ..., timeout: Optional[float] = ...) -> _T: ...
def get_nowait(self) -> _T: ...
def put(self, item: _T, block: bool = ..., timeout: Optional[float] = ...) -> None: ...
def put_nowait(self, item: _T) -> None: ...
def qsize(self) -> int: ...
if sys.version_info >= (3, 9):
def __class_getitem__(cls, item: Any) -> GenericAlias: ...

View File

@@ -1,129 +0,0 @@
import sys
import types
from socket import SocketType
from typing import Any, BinaryIO, Callable, ClassVar, List, Optional, Tuple, Type, TypeVar, Union
_T = TypeVar("_T")
class BaseServer:
address_family: int
RequestHandlerClass: Callable[..., BaseRequestHandler]
server_address: Tuple[str, int]
socket: SocketType
allow_reuse_address: bool
request_queue_size: int
socket_type: int
timeout: Optional[float]
def __init__(self, server_address: Any, RequestHandlerClass: Callable[..., BaseRequestHandler]) -> None: ...
def fileno(self) -> int: ...
def handle_request(self) -> None: ...
def serve_forever(self, poll_interval: float = ...) -> None: ...
def shutdown(self) -> None: ...
def server_close(self) -> None: ...
def finish_request(self, request: bytes, client_address: Tuple[str, int]) -> None: ...
def get_request(self) -> Tuple[SocketType, Tuple[str, int]]: ...
def handle_error(self, request: bytes, client_address: Tuple[str, int]) -> None: ...
def handle_timeout(self) -> None: ...
def process_request(self, request: bytes, client_address: Tuple[str, int]) -> None: ...
def server_activate(self) -> None: ...
def server_bind(self) -> None: ...
def verify_request(self, request: bytes, client_address: Tuple[str, int]) -> bool: ...
def __enter__(self: _T) -> _T: ...
def __exit__(
self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[types.TracebackType]
) -> None: ...
def service_actions(self) -> None: ...
class TCPServer(BaseServer):
def __init__(
self,
server_address: Tuple[str, int],
RequestHandlerClass: Callable[..., BaseRequestHandler],
bind_and_activate: bool = ...,
) -> None: ...
class UDPServer(BaseServer):
def __init__(
self,
server_address: Tuple[str, int],
RequestHandlerClass: Callable[..., BaseRequestHandler],
bind_and_activate: bool = ...,
) -> None: ...
if sys.platform != "win32":
class UnixStreamServer(BaseServer):
def __init__(
self,
server_address: Union[str, bytes],
RequestHandlerClass: Callable[..., BaseRequestHandler],
bind_and_activate: bool = ...,
) -> None: ...
class UnixDatagramServer(BaseServer):
def __init__(
self,
server_address: Union[str, bytes],
RequestHandlerClass: Callable[..., BaseRequestHandler],
bind_and_activate: bool = ...,
) -> None: ...
if sys.platform != "win32":
class ForkingMixIn:
timeout: Optional[float] # undocumented
active_children: Optional[List[int]] # undocumented
max_children: int # undocumented
if sys.version_info >= (3, 7):
block_on_close: bool
def collect_children(self, *, blocking: bool = ...) -> None: ... # undocumented
def handle_timeout(self) -> None: ... # undocumented
def service_actions(self) -> None: ... # undocumented
def process_request(self, request: bytes, client_address: Tuple[str, int]) -> None: ...
def server_close(self) -> None: ...
class ThreadingMixIn:
daemon_threads: bool
if sys.version_info >= (3, 7):
block_on_close: bool
def process_request_thread(self, request: bytes, client_address: Tuple[str, int]) -> None: ... # undocumented
def process_request(self, request: bytes, client_address: Tuple[str, int]) -> None: ...
def server_close(self) -> None: ...
if sys.platform != "win32":
class ForkingTCPServer(ForkingMixIn, TCPServer): ...
class ForkingUDPServer(ForkingMixIn, UDPServer): ...
class ThreadingTCPServer(ThreadingMixIn, TCPServer): ...
class ThreadingUDPServer(ThreadingMixIn, UDPServer): ...
if sys.platform != "win32":
class ThreadingUnixStreamServer(ThreadingMixIn, UnixStreamServer): ...
class ThreadingUnixDatagramServer(ThreadingMixIn, UnixDatagramServer): ...
class BaseRequestHandler:
# Those are technically of types, respectively:
# * Union[SocketType, Tuple[bytes, SocketType]]
# * Union[Tuple[str, int], str]
# But there are some concerns that having unions here would cause
# too much inconvenience to people using it (see
# https://github.com/python/typeshed/pull/384#issuecomment-234649696)
request: Any
client_address: Any
server: BaseServer
def __init__(self, request: Any, client_address: Any, server: BaseServer) -> None: ...
def setup(self) -> None: ...
def handle(self) -> None: ...
def finish(self) -> None: ...
class StreamRequestHandler(BaseRequestHandler):
rbufsize: ClassVar[int] # Undocumented
wbufsize: ClassVar[int] # Undocumented
timeout: ClassVar[Optional[float]] # Undocumented
disable_nagle_algorithm: ClassVar[bool] # Undocumented
connection: SocketType # Undocumented
rfile: BinaryIO
wfile: BinaryIO
class DatagramRequestHandler(BaseRequestHandler):
packet: SocketType # Undocumented
socket: SocketType # Undocumented
rfile: BinaryIO
wfile: BinaryIO

View File

@@ -188,7 +188,7 @@ pyclbr: 2.7-
pydoc: 2.7-
pydoc_data: 2.7-
pyexpat: 2.7-
queue: 2.7-
queue: 3.0-
quopri: 2.7-
random: 2.7-
re: 2.7-
@@ -210,7 +210,7 @@ smtpd: 2.7-
smtplib: 2.7-
sndhdr: 2.7-
socket: 2.7-
socketserver: 2.7-
socketserver: 3.0-
spwd: 2.7-
sqlite3: 2.7-
sre_compile: 2.7-