diff options
author | INADA Naoki <songofacandy@gmail.com> | 2016-10-18 11:48:14 +0900 |
---|---|---|
committer | INADA Naoki <songofacandy@gmail.com> | 2016-10-18 11:48:14 +0900 |
commit | d339e1514cdf5dfaf7e16e5b5341bd5f9a199b58 (patch) | |
tree | 3642e09818ca142a6e7f795d432e16cabed7a391 /Lib/asyncio | |
parent | 470ff1eed5d9fddf177e72c0d24f0cf3460d91cd (diff) | |
download | cpython-d339e1514cdf5dfaf7e16e5b5341bd5f9a199b58.tar.gz |
Issue #28452: Remove _asyncio._init_module function
Diffstat (limited to 'Lib/asyncio')
-rw-r--r-- | Lib/asyncio/futures.py | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/Lib/asyncio/futures.py b/Lib/asyncio/futures.py index 87ae30aa09..73215f50ef 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 |