File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -607,12 +607,12 @@ import sys
607
607
async def main():
608
608
res = await Once(await asyncio.sleep(0.1))
609
609
return res
610
-
611
- # It looks like that https://bugs.python.org/issue38563 solves this problem,
612
- # but we see still errors on Github actions...
610
+ # For an odd error similar to https://bugs.python.org/issue38563
613
611
if sys.platform == "win32" and sys.version_info >= (3, 8, 0):
614
612
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
615
- loop = asyncio.get_event_loop()
613
+ # get_event_loop can raise an error: https://github.com/PyO3/pyo3/pull/961#issuecomment-645238579
614
+ loop = asyncio.new_event_loop()
615
+ asyncio.set_event_loop(loop)
616
616
assert loop.run_until_complete(main()) is None
617
617
loop.close()
618
618
"#
You can’t perform that action at this time.
0 commit comments