massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / asyncio / __init__.pyi
1 import sys
2 from typing import Type
3
4 from .base_events import BaseEventLoop as BaseEventLoop
5 from .coroutines import coroutine as coroutine, iscoroutine as iscoroutine, iscoroutinefunction as iscoroutinefunction
6 from .events import (
7     AbstractEventLoop as AbstractEventLoop,
8     AbstractEventLoopPolicy as AbstractEventLoopPolicy,
9     AbstractServer as AbstractServer,
10     Handle as Handle,
11     TimerHandle as TimerHandle,
12     _get_running_loop as _get_running_loop,
13     _set_running_loop as _set_running_loop,
14     get_child_watcher as get_child_watcher,
15     get_event_loop as get_event_loop,
16     get_event_loop_policy as get_event_loop_policy,
17     new_event_loop as new_event_loop,
18     set_child_watcher as set_child_watcher,
19     set_event_loop as set_event_loop,
20     set_event_loop_policy as set_event_loop_policy,
21 )
22 from .futures import Future as Future, isfuture as isfuture, wrap_future as wrap_future
23 from .locks import (
24     BoundedSemaphore as BoundedSemaphore,
25     Condition as Condition,
26     Event as Event,
27     Lock as Lock,
28     Semaphore as Semaphore,
29 )
30 from .protocols import (
31     BaseProtocol as BaseProtocol,
32     DatagramProtocol as DatagramProtocol,
33     Protocol as Protocol,
34     SubprocessProtocol as SubprocessProtocol,
35 )
36 from .queues import (
37     LifoQueue as LifoQueue,
38     PriorityQueue as PriorityQueue,
39     Queue as Queue,
40     QueueEmpty as QueueEmpty,
41     QueueFull as QueueFull,
42 )
43 from .streams import (
44     StreamReader as StreamReader,
45     StreamReaderProtocol as StreamReaderProtocol,
46     StreamWriter as StreamWriter,
47     open_connection as open_connection,
48     start_server as start_server,
49 )
50 from .subprocess import create_subprocess_exec as create_subprocess_exec, create_subprocess_shell as create_subprocess_shell
51 from .tasks import (
52     ALL_COMPLETED as ALL_COMPLETED,
53     FIRST_COMPLETED as FIRST_COMPLETED,
54     FIRST_EXCEPTION as FIRST_EXCEPTION,
55     Task as Task,
56     as_completed as as_completed,
57     ensure_future as ensure_future,
58     gather as gather,
59     run_coroutine_threadsafe as run_coroutine_threadsafe,
60     shield as shield,
61     sleep as sleep,
62     wait as wait,
63     wait_for as wait_for,
64 )
65 from .transports import (
66     BaseTransport as BaseTransport,
67     DatagramTransport as DatagramTransport,
68     ReadTransport as ReadTransport,
69     SubprocessTransport as SubprocessTransport,
70     Transport as Transport,
71     WriteTransport as WriteTransport,
72 )
73
74 if sys.version_info >= (3, 7):
75     from .events import get_running_loop as get_running_loop
76 if sys.version_info >= (3, 8):
77     from .exceptions import (
78         CancelledError as CancelledError,
79         IncompleteReadError as IncompleteReadError,
80         InvalidStateError as InvalidStateError,
81         LimitOverrunError as LimitOverrunError,
82         SendfileNotAvailableError as SendfileNotAvailableError,
83         TimeoutError as TimeoutError,
84     )
85 else:
86     if sys.version_info >= (3, 7):
87         from .events import SendfileNotAvailableError as SendfileNotAvailableError
88     from .futures import CancelledError as CancelledError, InvalidStateError as InvalidStateError, TimeoutError as TimeoutError
89     from .streams import IncompleteReadError as IncompleteReadError, LimitOverrunError as LimitOverrunError
90
91 if sys.version_info >= (3, 7):
92     from .protocols import BufferedProtocol as BufferedProtocol
93
94 if sys.version_info >= (3, 7):
95     from .runners import run as run
96
97 if sys.version_info >= (3, 7):
98     from .tasks import all_tasks as all_tasks, create_task as create_task, current_task as current_task
99 if sys.version_info >= (3, 9):
100     from .threads import to_thread as to_thread
101
102 DefaultEventLoopPolicy: Type[AbstractEventLoopPolicy]
103 if sys.platform == "win32":
104     from .windows_events import *
105
106 if sys.platform != "win32":
107     from .streams import open_unix_connection as open_unix_connection, start_unix_server as start_unix_server
108     from .unix_events import (
109         AbstractChildWatcher as AbstractChildWatcher,
110         FastChildWatcher as FastChildWatcher,
111         SafeChildWatcher as SafeChildWatcher,
112         SelectorEventLoop as SelectorEventLoop,
113     )
114
115     if sys.version_info >= (3, 8):
116         from .unix_events import MultiLoopChildWatcher as MultiLoopChildWatcher, ThreadedChildWatcher as ThreadedChildWatcher