Skip to content

Commit 21ca52e

Browse files
committed
Fix missing names for asyncio in 3.14
1 parent 9f8f621 commit 21ca52e

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

stdlib/@tests/stubtest_allowlists/py314.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ mmap.mmap.flush
3535
mmap.mmap.rfind
3636
multiprocessing.process.BaseProcess.__init__
3737

38+
# Some names are exported via __getattr__ instead of __all__.
39+
asyncio.__all__
40+
3841
# ====================================
3942
# Pre-existing errors from Python 3.13
4043
# ====================================

stdlib/asyncio/__init__.pyi

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,20 @@ if sys.platform == "win32":
3333
else:
3434
from .unix_events import *
3535

36+
if sys.version_info >= (3, 14):
37+
from .events import _AbstractEventLoopPolicy as AbstractEventLoopPolicy
38+
39+
if sys.platform == "win32":
40+
if sys.version_info >= (3, 14):
41+
from .windows_events import (
42+
_DefaultEventLoopPolicy as DefaultEventLoopPolicy,
43+
_WindowsProactorEventLoopPolicy as WindowsProactorEventLoopPolicy,
44+
_WindowsSelectorEventLoopPolicy as WindowsSelectorEventLoopPolicy,
45+
)
46+
else:
47+
if sys.version_info >= (3, 14):
48+
from .unix_events import _DefaultEventLoopPolicy as DefaultEventLoopPolicy
49+
3650
if sys.platform == "win32":
3751
if sys.version_info >= (3, 14):
3852

@@ -41,6 +55,7 @@ if sys.platform == "win32":
4155
"Server", # from base_events
4256
"iscoroutinefunction", # from coroutines
4357
"iscoroutine", # from coroutines
58+
"AbstractEventLoopPolicy", # from events
4459
"AbstractEventLoop", # from events
4560
"AbstractServer", # from events
4661
"Handle", # from events
@@ -131,8 +146,11 @@ if sys.platform == "win32":
131146
"SelectorEventLoop", # from windows_events
132147
"ProactorEventLoop", # from windows_events
133148
"IocpProactor", # from windows_events
149+
"DefaultEventLoopPolicy", # from windows_events
134150
"_DefaultEventLoopPolicy", # from windows_events
151+
"WindowsSelectorEventLoopPolicy", # from windows_events
135152
"_WindowsSelectorEventLoopPolicy", # from windows_events
153+
"WindowsProactorEventLoopPolicy", # from windows_events
136154
"_WindowsProactorEventLoopPolicy", # from windows_events
137155
"EventLoop", # from windows_events
138156
)
@@ -514,6 +532,7 @@ else:
514532
"Server", # from base_events
515533
"iscoroutinefunction", # from coroutines
516534
"iscoroutine", # from coroutines
535+
"AbstractEventLoopPolicy", # from events
517536
"AbstractEventLoop", # from events
518537
"AbstractServer", # from events
519538
"Handle", # from events
@@ -604,6 +623,7 @@ else:
604623
"DatagramTransport", # from transports
605624
"SubprocessTransport", # from transports
606625
"SelectorEventLoop", # from unix_events
626+
"DefaultEventLoopPolicy", # from unix_events
607627
"EventLoop", # from unix_events
608628
)
609629
elif sys.version_info >= (3, 13):

0 commit comments

Comments
 (0)