Skip to content

asyncio.get_event_loop is not supported by python 3.10 #69

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions