Fix asyncio.run problem

nvchecker was giving me the
    "Task got Future <Future pending> attached to a different loop"
message mentioned at
    https://github.com/awestlake87/pyo3-asyncio/issues/19
so I applied the same change and nvchecker worked again.

Environment: Python 3.9 on Debian Bullseye
This commit is contained in:
Tom Rathborne 2022-02-03 09:54:22 +01:00
parent 2f61336ce3
commit 6d7cb4930b

View file

@ -78,7 +78,7 @@ def main() -> None:
result_coro = core.process_result(oldvers, result_q, entry_waiter)
runner_coro = core.run_tasks(futures)
newvers, has_failures = asyncio.run(run(result_coro, runner_coro))
newvers, has_failures = asyncio.get_event_loop().run_until_complete(run(result_coro, runner_coro))
if options.ver_files is not None:
core.write_verfile(options.ver_files[1], newvers)