basedpyright 1.13.1 → 1.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pyright-langserver.js +1 -1
- package/dist/pyright-langserver.js.map +1 -1
- package/dist/pyright.js +1 -1
- package/dist/pyright.js.map +1 -1
- package/dist/typeshed-fallback/commit.txt +1 -1
- package/dist/typeshed-fallback/stdlib/VERSIONS +3 -1
- package/dist/typeshed-fallback/stdlib/_ast.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/_bisect.pyi +221 -221
- package/dist/typeshed-fallback/stdlib/_csv.pyi +213 -213
- package/dist/typeshed-fallback/stdlib/_curses.pyi +1 -2
- package/dist/typeshed-fallback/stdlib/_heapq.pyi +67 -67
- package/dist/typeshed-fallback/stdlib/_interpchannels.pyi +84 -0
- package/dist/typeshed-fallback/stdlib/_json.pyi +92 -92
- package/dist/typeshed-fallback/stdlib/_lsprof.pyi +92 -92
- package/dist/typeshed-fallback/stdlib/_random.pyi +30 -30
- package/dist/typeshed-fallback/stdlib/_tkinter.pyi +7 -0
- package/dist/typeshed-fallback/stdlib/_weakref.pyi +3 -2
- package/dist/typeshed-fallback/stdlib/argparse.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/array.pyi +281 -281
- package/dist/typeshed-fallback/stdlib/asyncio/events.pyi +56 -37
- package/dist/typeshed-fallback/stdlib/asyncio/tasks.pyi +4 -1
- package/dist/typeshed-fallback/stdlib/asyncio/unix_events.pyi +156 -134
- package/dist/typeshed-fallback/stdlib/asyncio/windows_events.pyi +3 -2
- package/dist/typeshed-fallback/stdlib/audioop.pyi +95 -95
- package/dist/typeshed-fallback/stdlib/binascii.pyi +123 -123
- package/dist/typeshed-fallback/stdlib/cmath.pyi +112 -112
- package/dist/typeshed-fallback/stdlib/dataclasses.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/logging/__init__.pyi +2 -5
- package/dist/typeshed-fallback/stdlib/math.pyi +424 -424
- package/dist/typeshed-fallback/stdlib/mmap.pyi +160 -154
- package/dist/typeshed-fallback/stdlib/multiprocessing/context.pyi +10 -6
- package/dist/typeshed-fallback/stdlib/multiprocessing/sharedctypes.pyi +33 -12
- package/dist/typeshed-fallback/stdlib/os/__init__.pyi +10 -10
- package/dist/typeshed-fallback/stdlib/posixpath.pyi +3 -13
- package/dist/typeshed-fallback/stdlib/spwd.pyi +9 -0
- package/dist/typeshed-fallback/stdlib/subprocess.pyi +8 -0
- package/dist/typeshed-fallback/stdlib/tarfile.pyi +23 -1
- package/dist/typeshed-fallback/stdlib/telnetlib.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/typing.pyi +21 -2
- package/dist/typeshed-fallback/stdlib/weakref.pyi +4 -1
- package/dist/typeshed-fallback/stdlib/xml/sax/handler.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/zlib.pyi +157 -157
- package/dist/typeshed-fallback/stubs/Flask-SocketIO/flask_socketio/__init__.pyi +4 -4
- package/dist/typeshed-fallback/stubs/aiofiles/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/base.pyi +6 -20
- package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/os.pyi +2 -0
- package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/ospath.pyi +5 -3
- package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/tempfile/__init__.pyi +143 -79
- package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/threadpool/__init__.pyi +5 -5
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/extracting.pyi +7 -1
- package/dist/typeshed-fallback/stubs/docker/docker/_types.pyi +8 -0
- package/dist/typeshed-fallback/stubs/docker/docker/api/container.pyi +2 -2
- package/dist/typeshed-fallback/stubs/docker/docker/api/image.pyi +3 -2
- package/dist/typeshed-fallback/stubs/docker/docker/api/network.pyi +32 -15
- package/dist/typeshed-fallback/stubs/docker/docker/models/containers.pyi +36 -7
- package/dist/typeshed-fallback/stubs/docker/docker/models/images.pyi +67 -5
- package/dist/typeshed-fallback/stubs/docker/docker/models/networks.pyi +20 -3
- package/dist/typeshed-fallback/stubs/docker/docker/types/containers.pyi +78 -70
- package/dist/typeshed-fallback/stubs/docker/docker/utils/json_stream.pyi +4 -7
- package/dist/typeshed-fallback/stubs/flake8/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/fpdf.pyi +16 -5
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/image_datastructures.pyi +2 -1
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/table.pyi +4 -2
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/text_region.pyi +7 -7
- package/dist/typeshed-fallback/stubs/hdbcli/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/hdbcli/hdbcli/dbapi.pyi +1 -0
- package/dist/typeshed-fallback/stubs/hvac/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/raft.pyi +9 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/wrapping.pyi +1 -0
- package/dist/typeshed-fallback/stubs/influxdb-client/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/client/_pages.pyi +37 -0
- package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/client/bucket_api.pyi +5 -1
- package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/client/tasks_api.pyi +4 -3
- package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/domain/bucket.pyi +6 -6
- package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/domain/task.pyi +6 -6
- package/dist/typeshed-fallback/stubs/networkx/METADATA.toml +3 -1
- package/dist/typeshed-fallback/stubs/olefile/olefile/olefile.pyi +41 -31
- package/dist/typeshed-fallback/stubs/openpyxl/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/cell/rich_text.pyi +3 -0
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/chart/trendline.pyi +1 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/descriptors/base.pyi +1 -1
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/descriptors/container.pyi +18 -0
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/descriptors/sequence.pyi +20 -12
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/packaging/custom.pyi +1 -1
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/packaging/extended.pyi +2 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/packaging/relationship.pyi +6 -11
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/pivot/cache.pyi +66 -135
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/pivot/fields.pyi +2 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/styles/alignment.pyi +0 -1
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/styles/borders.pyi +0 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/styles/fills.pyi +3 -3
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/styles/named_styles.pyi +5 -10
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/utils/cell.pyi +2 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/utils/indexed_list.pyi +2 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/workbook/defined_name.pyi +2 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/_read_only.pyi +11 -3
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/datavalidation.pyi +2 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/dimensions.pyi +6 -3
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/filters.pyi +26 -22
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/hyperlink.pyi +3 -5
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/views.pyi +5 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/worksheet.pyi +4 -2
- package/dist/typeshed-fallback/stubs/peewee/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/peewee/peewee.pyi +6 -1
- package/dist/typeshed-fallback/stubs/protobuf/METADATA.toml +2 -2
- package/dist/typeshed-fallback/stubs/protobuf/google/protobuf/descriptor_pb2.pyi +84 -15
- package/dist/typeshed-fallback/stubs/psutil/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/psutil/psutil/__init__.pyi +3 -1
- package/dist/typeshed-fallback/stubs/psutil/psutil/_common.pyi +0 -2
- package/dist/typeshed-fallback/stubs/psutil/psutil/_compat.pyi +0 -1
- package/dist/typeshed-fallback/stubs/psutil/psutil/_psaix.pyi +1 -1
- package/dist/typeshed-fallback/stubs/psutil/psutil/_psbsd.pyi +1 -1
- package/dist/typeshed-fallback/stubs/psutil/psutil/_pslinux.pyi +2 -2
- package/dist/typeshed-fallback/stubs/psutil/psutil/_psosx.pyi +1 -1
- package/dist/typeshed-fallback/stubs/psutil/psutil/_pssunos.pyi +1 -1
- package/dist/typeshed-fallback/stubs/psutil/psutil/_psutil_osx.pyi +1 -1
- package/dist/typeshed-fallback/stubs/psutil/psutil/_pswindows.pyi +1 -1
- package/dist/typeshed-fallback/stubs/pyinstaller/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/pyinstaller/PyInstaller/__main__.pyi +1 -0
- package/dist/typeshed-fallback/stubs/pyinstaller/PyInstaller/building/splash.pyi +0 -2
- package/dist/typeshed-fallback/stubs/pyinstaller/PyInstaller/compat.pyi +2 -3
- package/dist/typeshed-fallback/stubs/reportlab/METADATA.toml +3 -2
- package/dist/typeshed-fallback/stubs/requests/requests/models.pyi +2 -2
- package/dist/typeshed-fallback/stubs/seaborn/METADATA.toml +2 -1
- package/dist/typeshed-fallback/stubs/setuptools/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/pkg_resources/__init__.pyi +80 -50
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/__init__.pyi +2 -4
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/build_meta.pyi +6 -3
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/bdist_egg.pyi +3 -9
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/bdist_wheel.pyi +61 -0
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/build_ext.pyi +2 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/build_py.pyi +12 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/easy_install.pyi +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/egg_info.pyi +4 -4
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/install_lib.pyi +3 -4
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/compat/py311.pyi +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/config/expand.pyi +0 -1
- package/dist/typeshed-fallback/stubs/shapely/METADATA.toml +2 -1
- package/dist/typeshed-fallback/stubs/shapely/shapely/_geometry.pyi +3 -3
- package/dist/typeshed-fallback/stubs/shapely/shapely/constructive.pyi +6 -6
- package/dist/typeshed-fallback/stubs/shapely/shapely/geometry/base.pyi +3 -3
- package/dist/typeshed-fallback/stubs/shapely/shapely/io.pyi +2 -2
- package/dist/typeshed-fallback/stubs/shapely/shapely/strtree.pyi +9 -9
- package/dist/typeshed-fallback/stubs/tree-sitter-languages/METADATA.toml +1 -1
- package/package.json +1 -1
- package/dist/typeshed-fallback/stubs/tree-sitter/METADATA.toml +0 -7
- package/dist/typeshed-fallback/stubs/tree-sitter/tree_sitter/__init__.pyi +0 -17
- package/dist/typeshed-fallback/stubs/tree-sitter/tree_sitter/binding.pyi +0 -115
|
@@ -16,23 +16,40 @@ from .tasks import Task
|
|
|
16
16
|
from .transports import BaseTransport, DatagramTransport, ReadTransport, SubprocessTransport, Transport, WriteTransport
|
|
17
17
|
from .unix_events import AbstractChildWatcher
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
19
|
+
if sys.version_info >= (3, 14):
|
|
20
|
+
__all__ = (
|
|
21
|
+
"AbstractEventLoopPolicy",
|
|
22
|
+
"AbstractEventLoop",
|
|
23
|
+
"AbstractServer",
|
|
24
|
+
"Handle",
|
|
25
|
+
"TimerHandle",
|
|
26
|
+
"get_event_loop_policy",
|
|
27
|
+
"set_event_loop_policy",
|
|
28
|
+
"get_event_loop",
|
|
29
|
+
"set_event_loop",
|
|
30
|
+
"new_event_loop",
|
|
31
|
+
"_set_running_loop",
|
|
32
|
+
"get_running_loop",
|
|
33
|
+
"_get_running_loop",
|
|
34
|
+
)
|
|
35
|
+
else:
|
|
36
|
+
__all__ = (
|
|
37
|
+
"AbstractEventLoopPolicy",
|
|
38
|
+
"AbstractEventLoop",
|
|
39
|
+
"AbstractServer",
|
|
40
|
+
"Handle",
|
|
41
|
+
"TimerHandle",
|
|
42
|
+
"get_event_loop_policy",
|
|
43
|
+
"set_event_loop_policy",
|
|
44
|
+
"get_event_loop",
|
|
45
|
+
"set_event_loop",
|
|
46
|
+
"new_event_loop",
|
|
47
|
+
"get_child_watcher",
|
|
48
|
+
"set_child_watcher",
|
|
49
|
+
"_set_running_loop",
|
|
50
|
+
"get_running_loop",
|
|
51
|
+
"_get_running_loop",
|
|
52
|
+
)
|
|
36
53
|
|
|
37
54
|
_T = TypeVar("_T")
|
|
38
55
|
_Ts = TypeVarTuple("_Ts")
|
|
@@ -541,18 +558,19 @@ class AbstractEventLoopPolicy:
|
|
|
541
558
|
@abstractmethod
|
|
542
559
|
def new_event_loop(self) -> AbstractEventLoop: ...
|
|
543
560
|
# Child processes handling (Unix only).
|
|
544
|
-
if sys.version_info
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
561
|
+
if sys.version_info < (3, 14):
|
|
562
|
+
if sys.version_info >= (3, 12):
|
|
563
|
+
@abstractmethod
|
|
564
|
+
@deprecated("Deprecated as of Python 3.12; will be removed in Python 3.14")
|
|
565
|
+
def get_child_watcher(self) -> AbstractChildWatcher: ...
|
|
566
|
+
@abstractmethod
|
|
567
|
+
@deprecated("Deprecated as of Python 3.12; will be removed in Python 3.14")
|
|
568
|
+
def set_child_watcher(self, watcher: AbstractChildWatcher) -> None: ...
|
|
569
|
+
else:
|
|
570
|
+
@abstractmethod
|
|
571
|
+
def get_child_watcher(self) -> AbstractChildWatcher: ...
|
|
572
|
+
@abstractmethod
|
|
573
|
+
def set_child_watcher(self, watcher: AbstractChildWatcher) -> None: ...
|
|
556
574
|
|
|
557
575
|
class BaseDefaultEventLoopPolicy(AbstractEventLoopPolicy, metaclass=ABCMeta):
|
|
558
576
|
def get_event_loop(self) -> AbstractEventLoop: ...
|
|
@@ -565,15 +583,16 @@ def get_event_loop() -> AbstractEventLoop: ...
|
|
|
565
583
|
def set_event_loop(loop: AbstractEventLoop | None) -> None: ...
|
|
566
584
|
def new_event_loop() -> AbstractEventLoop: ...
|
|
567
585
|
|
|
568
|
-
if sys.version_info
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
586
|
+
if sys.version_info < (3, 14):
|
|
587
|
+
if sys.version_info >= (3, 12):
|
|
588
|
+
@deprecated("Deprecated as of Python 3.12; will be removed in Python 3.14")
|
|
589
|
+
def get_child_watcher() -> AbstractChildWatcher: ...
|
|
590
|
+
@deprecated("Deprecated as of Python 3.12; will be removed in Python 3.14")
|
|
591
|
+
def set_child_watcher(watcher: AbstractChildWatcher) -> None: ...
|
|
573
592
|
|
|
574
|
-
else:
|
|
575
|
-
|
|
576
|
-
|
|
593
|
+
else:
|
|
594
|
+
def get_child_watcher() -> AbstractChildWatcher: ...
|
|
595
|
+
def set_child_watcher(watcher: AbstractChildWatcher) -> None: ...
|
|
577
596
|
|
|
578
597
|
def _set_running_loop(loop: AbstractEventLoop | None, /) -> None: ...
|
|
579
598
|
def _get_running_loop() -> AbstractEventLoop: ...
|
|
@@ -70,7 +70,10 @@ _T4 = TypeVar("_T4")
|
|
|
70
70
|
_T5 = TypeVar("_T5")
|
|
71
71
|
_T6 = TypeVar("_T6")
|
|
72
72
|
_FT = TypeVar("_FT", bound=Future[Any])
|
|
73
|
-
|
|
73
|
+
if sys.version_info >= (3, 12):
|
|
74
|
+
_FutureLike: TypeAlias = Future[_T] | Awaitable[_T]
|
|
75
|
+
else:
|
|
76
|
+
_FutureLike: TypeAlias = Future[_T] | Generator[Any, None, _T] | Awaitable[_T]
|
|
74
77
|
_TaskYieldType: TypeAlias = Future[object] | None
|
|
75
78
|
|
|
76
79
|
FIRST_COMPLETED = concurrent.futures.FIRST_COMPLETED
|
|
@@ -13,51 +13,54 @@ _Ts = TypeVarTuple("_Ts")
|
|
|
13
13
|
# This is also technically not available on Win,
|
|
14
14
|
# but other parts of typeshed need this definition.
|
|
15
15
|
# So, it is special cased.
|
|
16
|
-
if sys.version_info
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
16
|
+
if sys.version_info < (3, 14):
|
|
17
|
+
if sys.version_info >= (3, 12):
|
|
18
|
+
@deprecated("Deprecated as of Python 3.12; will be removed in Python 3.14")
|
|
19
|
+
class AbstractChildWatcher:
|
|
20
|
+
@abstractmethod
|
|
21
|
+
def add_child_handler(
|
|
22
|
+
self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts]
|
|
23
|
+
) -> None: ...
|
|
24
|
+
@abstractmethod
|
|
25
|
+
def remove_child_handler(self, pid: int) -> bool: ...
|
|
26
|
+
@abstractmethod
|
|
27
|
+
def attach_loop(self, loop: AbstractEventLoop | None) -> None: ...
|
|
28
|
+
@abstractmethod
|
|
29
|
+
def close(self) -> None: ...
|
|
30
|
+
@abstractmethod
|
|
31
|
+
def __enter__(self) -> Self: ...
|
|
32
|
+
@abstractmethod
|
|
33
|
+
def __exit__(
|
|
34
|
+
self, typ: type[BaseException] | None, exc: BaseException | None, tb: types.TracebackType | None
|
|
35
|
+
) -> None: ...
|
|
36
|
+
@abstractmethod
|
|
37
|
+
def is_active(self) -> bool: ...
|
|
38
|
+
|
|
39
|
+
else:
|
|
40
|
+
class AbstractChildWatcher:
|
|
41
|
+
@abstractmethod
|
|
42
|
+
def add_child_handler(
|
|
43
|
+
self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts]
|
|
44
|
+
) -> None: ...
|
|
45
|
+
@abstractmethod
|
|
46
|
+
def remove_child_handler(self, pid: int) -> bool: ...
|
|
47
|
+
@abstractmethod
|
|
48
|
+
def attach_loop(self, loop: AbstractEventLoop | None) -> None: ...
|
|
49
|
+
@abstractmethod
|
|
50
|
+
def close(self) -> None: ...
|
|
51
|
+
@abstractmethod
|
|
52
|
+
def __enter__(self) -> Self: ...
|
|
53
|
+
@abstractmethod
|
|
54
|
+
def __exit__(
|
|
55
|
+
self, typ: type[BaseException] | None, exc: BaseException | None, tb: types.TracebackType | None
|
|
56
|
+
) -> None: ...
|
|
57
|
+
@abstractmethod
|
|
58
|
+
def is_active(self) -> bool: ...
|
|
58
59
|
|
|
59
60
|
if sys.platform != "win32":
|
|
60
|
-
if sys.version_info >= (3,
|
|
61
|
+
if sys.version_info >= (3, 14):
|
|
62
|
+
__all__ = ("SelectorEventLoop", "DefaultEventLoopPolicy")
|
|
63
|
+
elif sys.version_info >= (3, 9):
|
|
61
64
|
__all__ = (
|
|
62
65
|
"SelectorEventLoop",
|
|
63
66
|
"AbstractChildWatcher",
|
|
@@ -79,118 +82,137 @@ if sys.platform != "win32":
|
|
|
79
82
|
"DefaultEventLoopPolicy",
|
|
80
83
|
)
|
|
81
84
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
@deprecated("Deprecated as of Python 3.12; will be removed in Python 3.14")
|
|
91
|
-
class SafeChildWatcher(BaseChildWatcher):
|
|
92
|
-
def __enter__(self) -> Self: ...
|
|
93
|
-
def __exit__(self, a: type[BaseException] | None, b: BaseException | None, c: types.TracebackType | None) -> None: ...
|
|
94
|
-
def add_child_handler(
|
|
95
|
-
self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts]
|
|
96
|
-
) -> None: ...
|
|
97
|
-
def remove_child_handler(self, pid: int) -> bool: ...
|
|
85
|
+
if sys.version_info < (3, 14):
|
|
86
|
+
if sys.version_info >= (3, 12):
|
|
87
|
+
# Doesn't actually have ABCMeta metaclass at runtime, but mypy complains if we don't have it in the stub.
|
|
88
|
+
# See discussion in #7412
|
|
89
|
+
class BaseChildWatcher(AbstractChildWatcher, metaclass=ABCMeta):
|
|
90
|
+
def close(self) -> None: ...
|
|
91
|
+
def is_active(self) -> bool: ...
|
|
92
|
+
def attach_loop(self, loop: AbstractEventLoop | None) -> None: ...
|
|
98
93
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
94
|
+
@deprecated("Deprecated as of Python 3.12; will be removed in Python 3.14")
|
|
95
|
+
class SafeChildWatcher(BaseChildWatcher):
|
|
96
|
+
def __enter__(self) -> Self: ...
|
|
97
|
+
def __exit__(
|
|
98
|
+
self, a: type[BaseException] | None, b: BaseException | None, c: types.TracebackType | None
|
|
99
|
+
) -> None: ...
|
|
100
|
+
def add_child_handler(
|
|
101
|
+
self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts]
|
|
102
|
+
) -> None: ...
|
|
103
|
+
def remove_child_handler(self, pid: int) -> bool: ...
|
|
107
104
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
105
|
+
@deprecated("Deprecated as of Python 3.12; will be removed in Python 3.14")
|
|
106
|
+
class FastChildWatcher(BaseChildWatcher):
|
|
107
|
+
def __enter__(self) -> Self: ...
|
|
108
|
+
def __exit__(
|
|
109
|
+
self, a: type[BaseException] | None, b: BaseException | None, c: types.TracebackType | None
|
|
110
|
+
) -> None: ...
|
|
111
|
+
def add_child_handler(
|
|
112
|
+
self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts]
|
|
113
|
+
) -> None: ...
|
|
114
|
+
def remove_child_handler(self, pid: int) -> bool: ...
|
|
116
115
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
self
|
|
122
|
-
|
|
123
|
-
|
|
116
|
+
else:
|
|
117
|
+
# Doesn't actually have ABCMeta metaclass at runtime, but mypy complains if we don't have it in the stub.
|
|
118
|
+
# See discussion in #7412
|
|
119
|
+
class BaseChildWatcher(AbstractChildWatcher, metaclass=ABCMeta):
|
|
120
|
+
def close(self) -> None: ...
|
|
121
|
+
def is_active(self) -> bool: ...
|
|
122
|
+
def attach_loop(self, loop: AbstractEventLoop | None) -> None: ...
|
|
123
|
+
|
|
124
|
+
class SafeChildWatcher(BaseChildWatcher):
|
|
125
|
+
def __enter__(self) -> Self: ...
|
|
126
|
+
def __exit__(
|
|
127
|
+
self, a: type[BaseException] | None, b: BaseException | None, c: types.TracebackType | None
|
|
128
|
+
) -> None: ...
|
|
129
|
+
def add_child_handler(
|
|
130
|
+
self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts]
|
|
131
|
+
) -> None: ...
|
|
132
|
+
def remove_child_handler(self, pid: int) -> bool: ...
|
|
133
|
+
|
|
134
|
+
class FastChildWatcher(BaseChildWatcher):
|
|
135
|
+
def __enter__(self) -> Self: ...
|
|
136
|
+
def __exit__(
|
|
137
|
+
self, a: type[BaseException] | None, b: BaseException | None, c: types.TracebackType | None
|
|
138
|
+
) -> None: ...
|
|
139
|
+
def add_child_handler(
|
|
140
|
+
self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts]
|
|
141
|
+
) -> None: ...
|
|
142
|
+
def remove_child_handler(self, pid: int) -> bool: ...
|
|
124
143
|
|
|
125
144
|
class _UnixSelectorEventLoop(BaseSelectorEventLoop): ...
|
|
126
145
|
|
|
127
146
|
class _UnixDefaultEventLoopPolicy(BaseDefaultEventLoopPolicy):
|
|
128
|
-
if sys.version_info
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
147
|
+
if sys.version_info < (3, 14):
|
|
148
|
+
if sys.version_info >= (3, 12):
|
|
149
|
+
@deprecated("Deprecated as of Python 3.12; will be removed in Python 3.14")
|
|
150
|
+
def get_child_watcher(self) -> AbstractChildWatcher: ...
|
|
151
|
+
@deprecated("Deprecated as of Python 3.12; will be removed in Python 3.14")
|
|
152
|
+
def set_child_watcher(self, watcher: AbstractChildWatcher | None) -> None: ...
|
|
153
|
+
else:
|
|
154
|
+
def get_child_watcher(self) -> AbstractChildWatcher: ...
|
|
155
|
+
def set_child_watcher(self, watcher: AbstractChildWatcher | None) -> None: ...
|
|
136
156
|
|
|
137
157
|
SelectorEventLoop = _UnixSelectorEventLoop
|
|
138
158
|
|
|
139
159
|
DefaultEventLoopPolicy = _UnixDefaultEventLoopPolicy
|
|
140
160
|
|
|
141
|
-
if sys.version_info
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
161
|
+
if sys.version_info < (3, 14):
|
|
162
|
+
if sys.version_info >= (3, 12):
|
|
163
|
+
@deprecated("Deprecated as of Python 3.12; will be removed in Python 3.14")
|
|
164
|
+
class MultiLoopChildWatcher(AbstractChildWatcher):
|
|
165
|
+
def is_active(self) -> bool: ...
|
|
166
|
+
def close(self) -> None: ...
|
|
167
|
+
def __enter__(self) -> Self: ...
|
|
168
|
+
def __exit__(
|
|
169
|
+
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: types.TracebackType | None
|
|
170
|
+
) -> None: ...
|
|
171
|
+
def add_child_handler(
|
|
172
|
+
self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts]
|
|
173
|
+
) -> None: ...
|
|
174
|
+
def remove_child_handler(self, pid: int) -> bool: ...
|
|
175
|
+
def attach_loop(self, loop: AbstractEventLoop | None) -> None: ...
|
|
155
176
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
177
|
+
else:
|
|
178
|
+
class MultiLoopChildWatcher(AbstractChildWatcher):
|
|
179
|
+
def is_active(self) -> bool: ...
|
|
180
|
+
def close(self) -> None: ...
|
|
181
|
+
def __enter__(self) -> Self: ...
|
|
182
|
+
def __exit__(
|
|
183
|
+
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: types.TracebackType | None
|
|
184
|
+
) -> None: ...
|
|
185
|
+
def add_child_handler(
|
|
186
|
+
self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts]
|
|
187
|
+
) -> None: ...
|
|
188
|
+
def remove_child_handler(self, pid: int) -> bool: ...
|
|
189
|
+
def attach_loop(self, loop: AbstractEventLoop | None) -> None: ...
|
|
190
|
+
|
|
191
|
+
if sys.version_info < (3, 14):
|
|
192
|
+
class ThreadedChildWatcher(AbstractChildWatcher):
|
|
193
|
+
def is_active(self) -> Literal[True]: ...
|
|
159
194
|
def close(self) -> None: ...
|
|
160
195
|
def __enter__(self) -> Self: ...
|
|
161
196
|
def __exit__(
|
|
162
197
|
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: types.TracebackType | None
|
|
163
198
|
) -> None: ...
|
|
199
|
+
def __del__(self) -> None: ...
|
|
164
200
|
def add_child_handler(
|
|
165
201
|
self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts]
|
|
166
202
|
) -> None: ...
|
|
167
203
|
def remove_child_handler(self, pid: int) -> bool: ...
|
|
168
204
|
def attach_loop(self, loop: AbstractEventLoop | None) -> None: ...
|
|
169
205
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
if sys.version_info >= (3, 9):
|
|
185
|
-
class PidfdChildWatcher(AbstractChildWatcher):
|
|
186
|
-
def __enter__(self) -> Self: ...
|
|
187
|
-
def __exit__(
|
|
188
|
-
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: types.TracebackType | None
|
|
189
|
-
) -> None: ...
|
|
190
|
-
def is_active(self) -> bool: ...
|
|
191
|
-
def close(self) -> None: ...
|
|
192
|
-
def attach_loop(self, loop: AbstractEventLoop | None) -> None: ...
|
|
193
|
-
def add_child_handler(
|
|
194
|
-
self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts]
|
|
195
|
-
) -> None: ...
|
|
196
|
-
def remove_child_handler(self, pid: int) -> bool: ...
|
|
206
|
+
if sys.version_info >= (3, 9):
|
|
207
|
+
class PidfdChildWatcher(AbstractChildWatcher):
|
|
208
|
+
def __enter__(self) -> Self: ...
|
|
209
|
+
def __exit__(
|
|
210
|
+
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: types.TracebackType | None
|
|
211
|
+
) -> None: ...
|
|
212
|
+
def is_active(self) -> bool: ...
|
|
213
|
+
def close(self) -> None: ...
|
|
214
|
+
def attach_loop(self, loop: AbstractEventLoop | None) -> None: ...
|
|
215
|
+
def add_child_handler(
|
|
216
|
+
self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts]
|
|
217
|
+
) -> None: ...
|
|
218
|
+
def remove_child_handler(self, pid: int) -> bool: ...
|
|
@@ -74,8 +74,9 @@ if sys.platform == "win32":
|
|
|
74
74
|
|
|
75
75
|
class WindowsSelectorEventLoopPolicy(events.BaseDefaultEventLoopPolicy):
|
|
76
76
|
_loop_factory: ClassVar[type[SelectorEventLoop]]
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
if sys.version_info < (3, 14):
|
|
78
|
+
def get_child_watcher(self) -> NoReturn: ...
|
|
79
|
+
def set_child_watcher(self, watcher: Any) -> NoReturn: ...
|
|
79
80
|
|
|
80
81
|
class WindowsProactorEventLoopPolicy(events.BaseDefaultEventLoopPolicy):
|
|
81
82
|
_loop_factory: ClassVar[type[ProactorEventLoop]]
|