import logging
import threading
import time
+import types
FIRST_COMPLETED = 'FIRST_COMPLETED'
FIRST_EXCEPTION = 'FIRST_EXCEPTION'
self._condition.notify_all()
self._invoke_callbacks()
+ __class_getitem__ = classmethod(types.GenericAlias)
+
class Executor(object):
"""This is an abstract base class for concrete asynchronous executors."""
import itertools
import queue
import threading
+import types
import weakref
import os
else:
self.future.set_result(result)
+ __class_getitem__ = classmethod(types.GenericAlias)
+
def _worker(executor_reference, work_queue, initializer, initargs):
if initializer is not None:
"""create and manipulate C data types in Python"""
import os as _os, sys as _sys
+import types as _types
__version__ = "1.1.0"
def LoadLibrary(self, name):
return self._dlltype(name)
+ __class_getitem__ = classmethod(_types.GenericAlias)
+
cdll = LibraryLoader(CDLL)
pydll = LibraryLoader(PyDLL)
#
import re
import string
+import types
__all__ = ["CookieError", "BaseCookie", "SimpleCookie"]
# Return the result
return _semispacejoin(result)
+ __class_getitem__ = classmethod(types.GenericAlias)
+
#
# Pattern for finding cookie
import array
import queue
import time
+import types
import os
from os import getpid
return self._callmethod('set', (value,))
value = property(get, set)
+ __class_getitem__ = classmethod(types.GenericAlias)
+
BaseListProxy = MakeProxyType('BaseListProxy', (
'__add__', '__contains__', '__delitem__', '__getitem__', '__len__',
import threading
import time
import traceback
+import types
import warnings
from queue import Empty
del self._cache[self._job]
self._pool = None
+ __class_getitem__ = classmethod(types.GenericAlias)
+
AsyncResult = ApplyResult # create alias -- see #17805
#
import threading
import collections
import time
+import types
import weakref
import errno
else:
with self._wlock:
self._writer.send_bytes(obj)
+
+ __class_getitem__ = classmethod(types.GenericAlias)
import errno
import struct
import secrets
+import types
if os.name == "nt":
import _winapi
return position
else:
raise ValueError(f"{value!r} not in this container")
+
+ __class_getitem__ = classmethod(types.GenericAlias)
'''A multi-producer, multi-consumer queue.'''
import threading
+import types
from collections import deque
from heapq import heappush, heappop
from time import monotonic as time
def _get(self):
return self.queue.popleft()
+ __class_getitem__ = classmethod(types.GenericAlias)
+
class PriorityQueue(Queue):
'''Variant of Queue that retrieves open entries in priority order (lowest first).
'''Return the approximate size of the queue (not reliable!).'''
return len(self._queue)
+ __class_getitem__ = classmethod(types.GenericAlias)
+
if SimpleQueue is None:
SimpleQueue = _PySimpleQueue
def cleanup(self):
if self._finalizer.detach():
self._rmtree(self.name)
+
+ __class_getitem__ = classmethod(_types.GenericAlias)
defaultdict, deque, OrderedDict, Counter, UserDict, UserList
)
from collections.abc import *
+from concurrent.futures import Future
+from concurrent.futures.thread import _WorkItem
from contextlib import AbstractContextManager, AbstractAsyncContextManager
+from ctypes import Array, LibraryLoader
from difflib import SequenceMatcher
from filecmp import dircmp
from fileinput import FileInput
from mmap import mmap
from ipaddress import IPv4Network, IPv4Interface, IPv6Network, IPv6Interface
from itertools import chain
+from http.cookies import Morsel
+from multiprocessing.managers import ValueProxy
+from multiprocessing.pool import ApplyResult
+from multiprocessing.shared_memory import ShareableList
+from multiprocessing.queues import SimpleQueue
from os import DirEntry
from re import Pattern, Match
from types import GenericAlias, MappingProxyType, AsyncGeneratorType
+from tempfile import TemporaryDirectory, SpooledTemporaryFile
+from urllib.parse import SplitResult, ParseResult
+from unittest.case import _AssertRaisesContext
+from queue import Queue, SimpleQueue
import typing
from typing import TypeVar
DirEntry,
IPv4Network, IPv4Interface, IPv6Network, IPv6Interface,
chain,
+ TemporaryDirectory, SpooledTemporaryFile,
+ Queue, SimpleQueue,
+ _AssertRaisesContext,
+ Array, LibraryLoader,
+ SplitResult, ParseResult,
+ ValueProxy, ApplyResult,
+ ShareableList, SimpleQueue,
+ Future, _WorkItem,
+ Morsel,
):
tname = t.__name__
with self.subTest(f"Testing {tname}"):
expected_regex.pattern, str(exc_value)))
return True
+ __class_getitem__ = classmethod(types.GenericAlias)
+
class _AssertWarnsContext(_AssertRaisesBaseContext):
"""A context manager used to implement TestCase.assertWarns* methods."""
import re
import sys
+import types
import collections
import warnings
raise ValueError("Port out of range 0-65535")
return port
+ __class_getitem__ = classmethod(types.GenericAlias)
+
class _NetlocResultMixinStr(_NetlocResultMixinBase, _ResultMixinStr):
__slots__ = ()
return self->b_length;
}
+static PyMethodDef Array_methods[] = {
+ {"__class_getitem__", (PyCFunction)Py_GenericAlias,
+ METH_O|METH_CLASS, PyDoc_STR("See PEP 585")},
+ { NULL, NULL }
+};
+
static PySequenceMethods Array_as_sequence = {
Array_length, /* sq_length; */
0, /* sq_concat; */
0, /* tp_weaklistoffset */
0, /* tp_iter */
0, /* tp_iternext */
- 0, /* tp_methods */
+ Array_methods, /* tp_methods */
0, /* tp_members */
0, /* tp_getset */
0, /* tp_base */
_QUEUE_SIMPLEQUEUE_PUT_METHODDEF
_QUEUE_SIMPLEQUEUE_PUT_NOWAIT_METHODDEF
_QUEUE_SIMPLEQUEUE_QSIZE_METHODDEF
+ {"__class_getitem__", (PyCFunction)Py_GenericAlias,
+ METH_O|METH_CLASS, PyDoc_STR("See PEP 585")},
{NULL, NULL} /* sentinel */
};