mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
bpo-36373: Fix deprecation warnings (GH-15889)
https://bugs.python.org/issue36373
This commit is contained in:
parent
efd5741ae9
commit
7264e92b71
5 changed files with 12 additions and 12 deletions
|
@ -89,8 +89,9 @@ class IsolatedAsyncioTestCase(TestCase):
|
|||
else:
|
||||
return ret
|
||||
|
||||
async def _asyncioLoopRunner(self):
|
||||
queue = self._asyncioCallsQueue
|
||||
async def _asyncioLoopRunner(self, fut):
|
||||
self._asyncioCallsQueue = queue = asyncio.Queue()
|
||||
fut.set_result(None)
|
||||
while True:
|
||||
query = await queue.get()
|
||||
queue.task_done()
|
||||
|
@ -113,8 +114,9 @@ class IsolatedAsyncioTestCase(TestCase):
|
|||
asyncio.set_event_loop(loop)
|
||||
loop.set_debug(True)
|
||||
self._asyncioTestLoop = loop
|
||||
self._asyncioCallsQueue = asyncio.Queue(loop=loop)
|
||||
self._asyncioCallsTask = loop.create_task(self._asyncioLoopRunner())
|
||||
fut = loop.create_future()
|
||||
self._asyncioCallsTask = loop.create_task(self._asyncioLoopRunner(fut))
|
||||
loop.run_until_complete(fut)
|
||||
|
||||
def _tearDownAsyncioLoop(self):
|
||||
assert self._asyncioTestLoop is not None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue