Skip to content

Commit

Permalink
multiprocessing: revert changes to queue classes
Browse files Browse the repository at this point in the history
Partial revert of python#4289. Fixes python#4313
  • Loading branch information
hauntsaninja committed Jul 16, 2020
1 parent 5e76f51 commit 7eedcde
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions stdlib/3/multiprocessing/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys
from ctypes import _CData
from logging import Logger
from multiprocessing import connection, pool, queues, sharedctypes, spawn, synchronize
from multiprocessing import connection, pool, sharedctypes, spawn, synchronize
from multiprocessing.context import (
AuthenticationError as AuthenticationError,
BaseContext,
Expand All @@ -14,6 +14,8 @@ from multiprocessing.context import (
)
from multiprocessing.managers import SyncManager
from multiprocessing.process import active_children as active_children, current_process as current_process
# These are technically functions that return instances of these Queue classes. See #4313 for discussion
from multiprocessing.queues import JoinableQueue as JoinableQueue, Queue as Queue, SimpleQueue as SimpleQueue
from multiprocessing.spawn import freeze_support as freeze_support
from typing import Any, Callable, Iterable, List, Optional, Sequence, Tuple, Type, Union, overload
from typing_extensions import Literal
Expand All @@ -35,10 +37,8 @@ def Barrier(parties: int, action: Optional[Callable[..., Any]] = ..., timeout: O
def BoundedSemaphore(value: int = ...) -> synchronize.BoundedSemaphore: ...
def Condition(lock: Optional[_LockLike] = ...) -> synchronize.Condition: ...
def Event() -> synchronize.Event: ...
def JoinableQueue(maxsize: int = ...) -> queues.JoinableQueue: ...
def Lock() -> synchronize.Lock: ...
def RLock() -> synchronize.RLock: ...
def SimpleQueue() -> queues.SimpleQueue: ...
def Semaphore(value: int = ...) -> synchronize.Semaphore: ...
def Pipe(duplex: bool = ...) -> Tuple[connection.Connection, connection.Connection]: ...
def Pool(
Expand All @@ -47,7 +47,6 @@ def Pool(
initargs: Iterable[Any] = ...,
maxtasksperchild: Optional[int] = ...,
) -> pool.Pool: ...
def Queue(maxsize: int = ...) -> queues.Queue: ...

# Functions Array and Value are copied from context.pyi.
# See https://github.com/python/typeshed/blob/ac234f25927634e06d9c96df98d72d54dd80dfc4/stdlib/2and3/turtle.pyi#L284-L291
Expand Down

0 comments on commit 7eedcde

Please sign in to comment.