mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
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 *".
This commit is contained in:
parent
98fa332e33
commit
be0a2d767c
1 changed files with 7 additions and 6 deletions
|
|
@ -29,12 +29,6 @@ from .subprocess import *
|
||||||
from .tasks import *
|
from .tasks import *
|
||||||
from .transports 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__ +
|
__all__ = (coroutines.__all__ +
|
||||||
events.__all__ +
|
events.__all__ +
|
||||||
futures.__all__ +
|
futures.__all__ +
|
||||||
|
|
@ -45,3 +39,10 @@ __all__ = (coroutines.__all__ +
|
||||||
subprocess.__all__ +
|
subprocess.__all__ +
|
||||||
tasks.__all__ +
|
tasks.__all__ +
|
||||||
transports.__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__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue