Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asyncio.get_event_loop is not supported by python 3.10 #69

Open
wu-wenxiang opened this issue Jun 16, 2022 · 2 comments
Open

asyncio.get_event_loop is not supported by python 3.10 #69

wu-wenxiang opened this issue Jun 16, 2022 · 2 comments

Comments

@wu-wenxiang
Copy link

Checklist

  • [ Y ] I have included information about relevant versions
  • [ Y ] I have verified that the issue persists when using the master branch of Mode.

Steps to reproduce

Tell us what you did to cause something to happen.

Expected behavior

asyncio.get_event_loop is not supported by python 3.10. We should use get_running_loop & asyncio.run() instead.

Does this project be archived? If that, we have to recreate mode2 repo. :-(

Actual behavior

Not support python 3.10

Full traceback

https://docs.python.org/3/library/asyncio-eventloop.html

Get the current event loop. If there is no current event loop set in the current OS thread, the OS thread is main, and set_event_loop() has not yet been called, asyncio will create a new event loop and set it as the current one.Because this function has rather complex behavior (especially when custom event loop policies are in use), using the get_running_loop() function is preferred to get_event_loop() in coroutines and callbacks. Consider also using the asyncio.run() function instead of using lower level functions to manually create and close an event loop. Deprecated since version 3.10: Deprecation warning is emitted if there is no running event loop. In future Python releases, this function will be an alias of get_running_loop().

get_running_loop is new in version 3.7

python 3.6 is out of support at the end of 2021.

Versions

  • Python 3.10
  • Mode version: Master branch
  • Operating system: Linux
@lqhuang
Copy link

lqhuang commented Jun 27, 2022

@wu-wenxiang You can try my forked release mode-ng which has already supported Python 3.10. It won't be better if you could also give me some feed-backs. Thanks!

@wu-wenxiang
Copy link
Author

Thanks~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants