Simplify __all__ for modules beginning with 'm' to 't' (#8028)

This commit is contained in:
Alex Waygood
2022-06-07 20:14:15 +01:00
committed by GitHub
parent b88ea4a499
commit 591593c85f
15 changed files with 620 additions and 1626 deletions

View File

@@ -29,85 +29,47 @@ if sys.version_info >= (3, 8):
if sys.platform != "win32":
from multiprocessing.context import ForkContext, ForkServerContext
__all__ = [
"Array",
"AuthenticationError",
"Barrier",
"BoundedSemaphore",
"BufferTooShort",
"Condition",
"Event",
"JoinableQueue",
"Lock",
"Manager",
"Pipe",
"Pool",
"Process",
"ProcessError",
"Queue",
"RLock",
"RawArray",
"RawValue",
"Semaphore",
"SimpleQueue",
"TimeoutError",
"Value",
"active_children",
"allow_connection_pickling",
"cpu_count",
"current_process",
"freeze_support",
"get_all_start_methods",
"get_context",
"get_logger",
"get_start_method",
"log_to_stderr",
"reducer",
"set_executable",
"set_forkserver_preload",
"set_start_method",
]
if sys.version_info >= (3, 8):
__all__ = [
"Array",
"AuthenticationError",
"Barrier",
"BoundedSemaphore",
"BufferTooShort",
"Condition",
"Event",
"JoinableQueue",
"Lock",
"Manager",
"Pipe",
"Pool",
"Process",
"ProcessError",
"Queue",
"RLock",
"RawArray",
"RawValue",
"Semaphore",
"SimpleQueue",
"TimeoutError",
"Value",
"active_children",
"allow_connection_pickling",
"cpu_count",
"current_process",
"freeze_support",
"get_all_start_methods",
"get_context",
"get_logger",
"get_start_method",
"parent_process",
"log_to_stderr",
"reducer",
"set_executable",
"set_forkserver_preload",
"set_start_method",
]
else:
__all__ = [
"Array",
"AuthenticationError",
"Barrier",
"BoundedSemaphore",
"BufferTooShort",
"Condition",
"Event",
"JoinableQueue",
"Lock",
"Manager",
"Pipe",
"Pool",
"Process",
"ProcessError",
"Queue",
"RLock",
"RawArray",
"RawValue",
"Semaphore",
"SimpleQueue",
"TimeoutError",
"Value",
"active_children",
"allow_connection_pickling",
"cpu_count",
"current_process",
"freeze_support",
"get_all_start_methods",
"get_context",
"get_logger",
"get_start_method",
"log_to_stderr",
"reducer",
"set_executable",
"set_forkserver_preload",
"set_start_method",
]
__all__ += ["parent_process"]
# The following type aliases can be used to annotate the return values of
# the corresponding functions. They are not defined at runtime.