mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Clean up asyncio.__init__ (#6497)
This commit is contained in:
@@ -73,30 +73,31 @@ from .transports import (
|
||||
|
||||
if sys.version_info < (3, 11):
|
||||
from .coroutines import coroutine as coroutine
|
||||
if sys.version_info >= (3, 7):
|
||||
from .events import get_running_loop as get_running_loop
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from .threads import to_thread as to_thread
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
from .exceptions import (
|
||||
CancelledError as CancelledError,
|
||||
IncompleteReadError as IncompleteReadError,
|
||||
InvalidStateError as InvalidStateError,
|
||||
LimitOverrunError as LimitOverrunError,
|
||||
SendfileNotAvailableError as SendfileNotAvailableError,
|
||||
TimeoutError as TimeoutError,
|
||||
)
|
||||
else:
|
||||
if sys.version_info >= (3, 7):
|
||||
from .events import SendfileNotAvailableError as SendfileNotAvailableError
|
||||
from .futures import CancelledError as CancelledError, InvalidStateError as InvalidStateError, TimeoutError as TimeoutError
|
||||
from .streams import IncompleteReadError as IncompleteReadError, LimitOverrunError as LimitOverrunError
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
from .exceptions import SendfileNotAvailableError as SendfileNotAvailableError
|
||||
elif sys.version_info >= (3, 7):
|
||||
from .events import SendfileNotAvailableError as SendfileNotAvailableError
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
from .events import get_running_loop as get_running_loop
|
||||
from .protocols import BufferedProtocol as BufferedProtocol
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
from .runners import run as run
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
from .tasks import (
|
||||
_enter_task as _enter_task,
|
||||
_leave_task as _leave_task,
|
||||
@@ -106,14 +107,12 @@ if sys.version_info >= (3, 7):
|
||||
create_task as create_task,
|
||||
current_task as current_task,
|
||||
)
|
||||
if sys.version_info >= (3, 9):
|
||||
from .threads import to_thread as to_thread
|
||||
|
||||
DefaultEventLoopPolicy: Type[AbstractEventLoopPolicy]
|
||||
|
||||
if sys.platform == "win32":
|
||||
from .windows_events import *
|
||||
|
||||
if sys.platform != "win32":
|
||||
else:
|
||||
from .streams import open_unix_connection as open_unix_connection, start_unix_server as start_unix_server
|
||||
from .unix_events import (
|
||||
AbstractChildWatcher as AbstractChildWatcher,
|
||||
|
||||
Reference in New Issue
Block a user