summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/__init__.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-07-18 10:44:25 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-07-18 10:44:25 (GMT)
commitbe0a2d767cd603046a4709c9a3fb049a3ae25bd7 (patch)
tree7e8f3f0a3cb4687af75bc54f35dc41e68cec0692 /Lib/asyncio/__init__.py
parent98fa332e334633d5559ff3963df0ab5c6108d8e1 (diff)
downloadcpython-be0a2d767cd603046a4709c9a3fb049a3ae25bd7.zip
cpython-be0a2d767cd603046a4709c9a3fb049a3ae25bd7.tar.gz
cpython-be0a2d767cd603046a4709c9a3fb049a3ae25bd7.tar.bz2
Fix asyncio.__all__: export also unix_events and windows_events symbols
For example, on Windows, it was not possible to get ProactorEventLoop or DefaultEventLoopPolicy using "from asyncio import *".
Diffstat (limited to 'Lib/asyncio/__init__.py')
-rw-r--r--Lib/asyncio/__init__.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/Lib/asyncio/__init__.py b/Lib/asyncio/__init__.py
index 789424e..3911fb4 100644
--- a/Lib/asyncio/__init__.py
+++ b/Lib/asyncio/__init__.py
@@ -29,12 +29,6 @@ from .subprocess import *
from .tasks import *
from .transports import *
-if sys.platform == 'win32': # pragma: no cover
- from .windows_events import *
-else:
- from .unix_events import * # pragma: no cover
-
-
__all__ = (coroutines.__all__ +
events.__all__ +
futures.__all__ +
@@ -45,3 +39,10 @@ __all__ = (coroutines.__all__ +
subprocess.__all__ +
tasks.__all__ +
transports.__all__)
+
+if sys.platform == 'win32': # pragma: no cover
+ from .windows_events import *
+ __all__ += windows_events.__all__
+else:
+ from .unix_events import * # pragma: no cover
+ __all__ += unix_events.__all__