aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2020-01-07 16:55:19 +0200
committerGitHub <noreply@github.com>2020-01-07 16:55:19 +0200
commit4112a3da2e01ecc19e9f54b8ac7b383b6f5e85c8 (patch)
tree00241da39d605a863f909a7827467ce618b5195f /Lib/asyncio/base_events.py
parentbpo-38623: Doc: Add section for site module CLI. (GH-17858) (diff)
downloadcpython-4112a3da2e01ecc19e9f54b8ac7b383b6f5e85c8.tar.gz
cpython-4112a3da2e01ecc19e9f54b8ac7b383b6f5e85c8.tar.bz2
cpython-4112a3da2e01ecc19e9f54b8ac7b383b6f5e85c8.zip
[3.8] bpo-39191: Fix RuntimeWarning in asyncio test (GH-17863) (#17894)
https://bugs.python.org/issue39191. (cherry picked from commit 10ac0cded26d91c3468e5e5a87cecad7fc0bcebd) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Diffstat (limited to 'Lib/asyncio/base_events.py')
-rw-r--r--Lib/asyncio/base_events.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py
index aedf0c5e6d3..799013d5ccc 100644
--- a/Lib/asyncio/base_events.py
+++ b/Lib/asyncio/base_events.py
@@ -547,7 +547,7 @@ class BaseEventLoop(events.AbstractEventLoop):
'asyncgen': agen
})
- def _check_runnung(self):
+ def _check_running(self):
if self.is_running():
raise RuntimeError('This event loop is already running')
if events._get_running_loop() is not None:
@@ -557,7 +557,7 @@ class BaseEventLoop(events.AbstractEventLoop):
def run_forever(self):
"""Run until stop() is called."""
self._check_closed()
- self._check_runnung()
+ self._check_running()
self._set_coroutine_origin_tracking(self._debug)
self._thread_id = threading.get_ident()
@@ -589,7 +589,7 @@ class BaseEventLoop(events.AbstractEventLoop):
Return the Future's result, or raise its exception.
"""
self._check_closed()
- self._check_runnung()
+ self._check_running()
new_task = not futures.isfuture(future)
future = tasks.ensure_future(future, loop=self)