lowercase list and dict in the rest of stdlib (#5892)

This commit is contained in:
Akuli
2021-08-09 01:13:08 +03:00
committed by GitHub
parent 191aac3b0e
commit 9af9cca7f3
5 changed files with 53 additions and 49 deletions

View File

@@ -3,7 +3,7 @@
import queue
import sys
import threading
from typing import Any, AnyStr, Callable, ContextManager, Dict, Generic, Iterable, List, Mapping, Sequence, Tuple, TypeVar
from typing import Any, AnyStr, Callable, ContextManager, Generic, Iterable, Mapping, Sequence, Tuple, TypeVar
from .connection import Connection
from .context import BaseContext
@@ -38,7 +38,7 @@ class Token(object):
def __setstate__(self, state: Tuple[str | bytes | None, Tuple[str | bytes, int], str | bytes | int | None]) -> None: ...
class BaseProxy(object):
_address_to_local: Dict[Any, Any]
_address_to_local: dict[Any, Any]
_mutex: Any
def __init__(
self,
@@ -51,9 +51,9 @@ class BaseProxy(object):
manager_owned: bool = ...,
) -> None: ...
def __deepcopy__(self, memo: Any | None) -> Any: ...
def _callmethod(self, methodname: str, args: Tuple[Any, ...] = ..., kwds: Dict[Any, Any] = ...) -> None: ...
def _callmethod(self, methodname: str, args: Tuple[Any, ...] = ..., kwds: dict[Any, Any] = ...) -> None: ...
def _getvalue(self) -> Any: ...
def __reduce__(self) -> Tuple[Any, Tuple[Any, Any, str, Dict[Any, Any]]]: ...
def __reduce__(self) -> Tuple[Any, Tuple[Any, Any, str, dict[Any, Any]]]: ...
class ValueProxy(BaseProxy, Generic[_T]):
def get(self) -> _T: ...
@@ -66,7 +66,7 @@ class ValueProxy(BaseProxy, Generic[_T]):
class Server:
address: Any
def __init__(
self, registry: Dict[str, Tuple[Callable[..., Any], Any, Any, Any]], address: Any, authkey: bytes, serializer: str
self, registry: dict[str, Tuple[Callable[..., Any], Any, Any, Any]], address: Any, authkey: bytes, serializer: str
) -> None: ...
def serve_forever(self) -> None: ...
def accept_connection(self, c: Connection, name: str) -> None: ...
@@ -93,6 +93,10 @@ class BaseManager(ContextManager[BaseManager]):
create_method: bool = ...,
) -> None: ...
# Conflicts with method names
_dict = dict
_list = list
class SyncManager(BaseManager, ContextManager[SyncManager]):
def BoundedSemaphore(self, value: Any = ...) -> threading.BoundedSemaphore: ...
def Condition(self, lock: Any = ...) -> threading.Condition: ...
@@ -104,8 +108,8 @@ class SyncManager(BaseManager, ContextManager[SyncManager]):
def Semaphore(self, value: Any = ...) -> threading.Semaphore: ...
def Array(self, typecode: Any, sequence: Sequence[_T]) -> Sequence[_T]: ...
def Value(self, typecode: Any, value: _T) -> ValueProxy[_T]: ...
def dict(self, sequence: Mapping[_KT, _VT] = ...) -> Dict[_KT, _VT]: ...
def list(self, sequence: Sequence[_T] = ...) -> List[_T]: ...
def dict(self, sequence: Mapping[_KT, _VT] = ...) -> _dict[_KT, _VT]: ...
def list(self, sequence: Sequence[_T] = ...) -> _list[_T]: ...
class RemoteError(Exception): ...