summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorINADA Naoki <songofacandy@gmail.com>2016-10-18 02:48:14 (GMT)
committerINADA Naoki <songofacandy@gmail.com>2016-10-18 02:48:14 (GMT)
commitc411a7d8210febfbe96a2547357752be6be7adad (patch)
tree7b20c1c758d26b1f3bf87408622ccdae02226aa5 /Lib/asyncio
parent80b618bffdb8f2ba219f73c49ff648d91b6085a9 (diff)
downloadcpython-c411a7d8210febfbe96a2547357752be6be7adad.zip
cpython-c411a7d8210febfbe96a2547357752be6be7adad.tar.gz
cpython-c411a7d8210febfbe96a2547357752be6be7adad.tar.bz2
Issue #28452: Remove _asyncio._init_module function
Diffstat (limited to 'Lib/asyncio')
-rw-r--r--Lib/asyncio/futures.py23
1 files changed, 8 insertions, 15 deletions
diff --git a/Lib/asyncio/futures.py b/Lib/asyncio/futures.py
index 87ae30a..73215f5 100644
--- a/Lib/asyncio/futures.py
+++ b/Lib/asyncio/futures.py
@@ -431,21 +431,6 @@ def _copy_future_state(source, dest):
dest.set_result(result)
-try:
- import _asyncio
-except ImportError:
- pass
-else:
- _asyncio._init_module(
- traceback.extract_stack,
- events.get_event_loop,
- _future_repr_info,
- InvalidStateError,
- CancelledError)
-
- Future = _asyncio.Future
-
-
def _chain_future(source, destination):
"""Chain two futures so that when one completes, so does the other.
@@ -496,3 +481,11 @@ def wrap_future(future, *, loop=None):
new_future = loop.create_future()
_chain_future(future, new_future)
return new_future
+
+
+try:
+ import _asyncio
+except ImportError:
+ pass
+else:
+ Future = _asyncio.Future