Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python: Fix windows runtime error: adapt asyncio event loop policy fo…
…r windows python 3.10 and above (#1416) ### Motivation and Context To fix a runtime error on windows for python version 3.10, 3.11 and above On windows, python version above 3.10.1, there will be a runtime error caused by asyncio event loop. add adapting code for windows when python version is above 3.10.1 to avoid the error. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Refer link: https://docs.python.org/3/library/asyncio-policy.html "Note In Python versions 3.10.9, 3.11.1 and 3.12 the [get_event_loop()](https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.get_event_loop) method of the default asyncio policy emits a [DeprecationWarning](https://docs.python.org/3/library/exceptions.html#DeprecationWarning) if there is no running event loop and no current loop is set. In some future Python release this will become an error." Note: per testing, this error also occurred on python 3.10 below 3.10.9 Co-authored-by: Mark Karle <[email protected]> Co-authored-by: Lee Miller <[email protected]>
- Loading branch information