__init__.py 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. """The asyncio package, tracking PEP 3156."""
  2. # flake8: noqa
  3. import sys
  4. # This relies on each of the submodules having an __all__ variable.
  5. from .base_events import *
  6. from .coroutines import *
  7. from .events import *
  8. from .exceptions import *
  9. from .futures import *
  10. from .locks import *
  11. from .protocols import *
  12. from .runners import *
  13. from .queues import *
  14. from .streams import *
  15. from .subprocess import *
  16. from .tasks import *
  17. from .threads import *
  18. from .transports import *
  19. # Exposed for _asynciomodule.c to implement now deprecated
  20. # Task.all_tasks() method. This function will be removed in 3.9.
  21. from .tasks import _all_tasks_compat # NoQA
  22. __all__ = (base_events.__all__ +
  23. coroutines.__all__ +
  24. events.__all__ +
  25. exceptions.__all__ +
  26. futures.__all__ +
  27. locks.__all__ +
  28. protocols.__all__ +
  29. runners.__all__ +
  30. queues.__all__ +
  31. streams.__all__ +
  32. subprocess.__all__ +
  33. tasks.__all__ +
  34. threads.__all__ +
  35. transports.__all__)
  36. if sys.platform == 'win32': # pragma: no cover
  37. from .windows_events import *
  38. __all__ += windows_events.__all__
  39. else:
  40. from .unix_events import * # pragma: no cover
  41. __all__ += unix_events.__all__