Re-organize directory structure (#4971)

See discussion in #2491

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
This commit is contained in:
Ivan Levkivskyi
2021-01-27 12:00:39 +00:00
committed by GitHub
parent 869238e587
commit 16ae4c6120
1399 changed files with 601 additions and 97 deletions

View File

@@ -0,0 +1,52 @@
import array
import threading
import weakref
from queue import Queue as Queue
from typing import Any, Callable, Iterable, List, Mapping, Optional, Sequence
JoinableQueue = Queue
Barrier = threading.Barrier
BoundedSemaphore = threading.BoundedSemaphore
Condition = threading.Condition
Event = threading.Event
Lock = threading.Lock
RLock = threading.RLock
Semaphore = threading.Semaphore
class DummyProcess(threading.Thread):
_children: weakref.WeakKeyDictionary[Any, Any]
_parent: threading.Thread
_pid: None
_start_called: int
exitcode: Optional[int]
def __init__(
self,
group: Any = ...,
target: Optional[Callable[..., Any]] = ...,
name: Optional[str] = ...,
args: Iterable[Any] = ...,
kwargs: Mapping[str, Any] = ...,
) -> None: ...
Process = DummyProcess
class Namespace:
def __init__(self, **kwds: Any) -> None: ...
def __getattr__(self, __name: str) -> Any: ...
def __setattr__(self, __name: str, __value: Any) -> None: ...
class Value:
_typecode: Any
_value: Any
value: Any
def __init__(self, typecode: Any, value: Any, lock: Any = ...) -> None: ...
def Array(typecode: Any, sequence: Sequence[Any], lock: Any = ...) -> array.array[Any]: ...
def Manager() -> Any: ...
def Pool(
processes: Optional[int] = ..., initializer: Optional[Callable[..., Any]] = ..., initargs: Iterable[Any] = ...
) -> Any: ...
def active_children() -> List[Any]: ...
def current_process() -> threading.Thread: ...
def freeze_support() -> None: ...
def shutdown() -> None: ...

View File

@@ -0,0 +1,39 @@
from queue import Queue
from types import TracebackType
from typing import Any, List, Optional, Tuple, Type, TypeVar, Union
families: List[None]
_ConnectionT = TypeVar("_ConnectionT", bound=Connection)
_ListenerT = TypeVar("_ListenerT", bound=Listener)
_Address = Union[str, Tuple[str, int]]
class Connection(object):
_in: Any
_out: Any
recv: Any
recv_bytes: Any
send: Any
send_bytes: Any
def __enter__(self: _ConnectionT) -> _ConnectionT: ...
def __exit__(
self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]
) -> None: ...
def __init__(self, _in: Any, _out: Any) -> None: ...
def close(self) -> None: ...
def poll(self, timeout: float = ...) -> bool: ...
class Listener(object):
_backlog_queue: Optional[Queue[Any]]
@property
def address(self) -> Optional[Queue[Any]]: ...
def __enter__(self: _ListenerT) -> _ListenerT: ...
def __exit__(
self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]
) -> None: ...
def __init__(self, address: Optional[_Address] = ..., family: Optional[int] = ..., backlog: int = ...) -> None: ...
def accept(self) -> Connection: ...
def close(self) -> None: ...
def Client(address: _Address) -> Connection: ...
def Pipe(duplex: bool = ...) -> Tuple[Connection, Connection]: ...