summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorThomas Grainger <tagrain@gmail.com>2023-10-12 14:13:57 (GMT)
committerGitHub <noreply@github.com>2023-10-12 14:13:57 (GMT)
commit8c6c14b91bf95e04018151c53bce6e27e0e22447 (patch)
tree10032d3467d24b4ef7d490173b10ae3bc9f28b5e /Lib/asyncio
parent1e3460d9faaffb35b3c6175c666b1f45aea2c1d8 (diff)
downloadcpython-8c6c14b91bf95e04018151c53bce6e27e0e22447.zip
cpython-8c6c14b91bf95e04018151c53bce6e27e0e22447.tar.gz
cpython-8c6c14b91bf95e04018151c53bce6e27e0e22447.tar.bz2
gh-94597: Add asyncio.EventLoop (#110723)
This is needed to pave the way for deprecating and eventually killing the event loop policy system (which is over-engineered and rarely used).
Diffstat (limited to 'Lib/asyncio')
-rw-r--r--Lib/asyncio/unix_events.py2
-rw-r--r--Lib/asyncio/windows_events.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py
index 28cef96..65f0923 100644
--- a/Lib/asyncio/unix_events.py
+++ b/Lib/asyncio/unix_events.py
@@ -32,6 +32,7 @@ __all__ = (
'FastChildWatcher', 'PidfdChildWatcher',
'MultiLoopChildWatcher', 'ThreadedChildWatcher',
'DefaultEventLoopPolicy',
+ 'EventLoop',
)
@@ -1510,3 +1511,4 @@ class _UnixDefaultEventLoopPolicy(events.BaseDefaultEventLoopPolicy):
SelectorEventLoop = _UnixSelectorEventLoop
DefaultEventLoopPolicy = _UnixDefaultEventLoopPolicy
+EventLoop = SelectorEventLoop
diff --git a/Lib/asyncio/windows_events.py b/Lib/asyncio/windows_events.py
index c9a5fb8..4a4c4be 100644
--- a/Lib/asyncio/windows_events.py
+++ b/Lib/asyncio/windows_events.py
@@ -29,7 +29,7 @@ from .log import logger
__all__ = (
'SelectorEventLoop', 'ProactorEventLoop', 'IocpProactor',
'DefaultEventLoopPolicy', 'WindowsSelectorEventLoopPolicy',
- 'WindowsProactorEventLoopPolicy',
+ 'WindowsProactorEventLoopPolicy', 'EventLoop',
)
@@ -894,3 +894,4 @@ class WindowsProactorEventLoopPolicy(events.BaseDefaultEventLoopPolicy):
DefaultEventLoopPolicy = WindowsProactorEventLoopPolicy
+EventLoop = ProactorEventLoop