ยปCore Development>Code coverage>Lib/asyncio/__init__.py

Python code coverage for Lib/asyncio/__init__.py

#countcontent
1n/a"""The asyncio package, tracking PEP 3156."""
2n/a
3n/aimport sys
4n/a
5n/a# The selectors module is in the stdlib in Python 3.4 but not in 3.3.
6n/a# Do this first, so the other submodules can use "from . import selectors".
7n/a# Prefer asyncio/selectors.py over the stdlib one, as ours may be newer.
8n/atry:
9n/a from . import selectors
10n/aexcept ImportError:
11n/a import selectors # Will also be exported.
12n/a
13n/aif sys.platform == 'win32':
14n/a # Similar thing for _overlapped.
15n/a try:
16n/a from . import _overlapped
17n/a except ImportError:
18n/a import _overlapped # Will also be exported.
19n/a
20n/a# This relies on each of the submodules having an __all__ variable.
21n/afrom .base_events import *
22n/afrom .coroutines import *
23n/afrom .events import *
24n/afrom .futures import *
25n/afrom .locks import *
26n/afrom .protocols import *
27n/afrom .queues import *
28n/afrom .streams import *
29n/afrom .subprocess import *
30n/afrom .tasks import *
31n/afrom .transports import *
32n/a
33n/a__all__ = (base_events.__all__ +
34n/a coroutines.__all__ +
35n/a events.__all__ +
36n/a futures.__all__ +
37n/a locks.__all__ +
38n/a protocols.__all__ +
39n/a queues.__all__ +
40n/a streams.__all__ +
41n/a subprocess.__all__ +
42n/a tasks.__all__ +
43n/a transports.__all__)
44n/a
45n/aif sys.platform == 'win32': # pragma: no cover
46n/a from .windows_events import *
47n/a __all__ += windows_events.__all__
48n/aelse:
49n/a from .unix_events import * # pragma: no cover
50n/a __all__ += unix_events.__all__