Uploaded image for project: 'Motor'
  1. Motor
  2. MOTOR-902

Since Python 3.10 asyncio.get_event_loop() is deprecated

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.0
    • Affects Version/s: 2.5.1
    • Component/s: asyncio
    • None

      Since Python 3.10, Motor raises a deprecation warning when running it through the asyncio framework.

      W 2022-02-27 17:31:32,197 py.warnings: C:\Users\taven\AppData\Local\pypoetry\Cache\virtualenvs\argus-aMIcPOay-py3.10\lib\site-packages\motor\frameworks\asyncio\__init__.py:42: DeprecationWarning: There is no current event loop
       return asyncio.get_event_loop()

      Note: this has been fixed in Motor 2.5.2 and 3.0 and the warning can be avoided by installing as either pip install motor==2.5.2 or pip install "motor>=3.0".

            Assignee:
            steve.silvester@mongodb.com Steve Silvester
            Reporter:
            daegontaven@gmail.com Daegon Taven
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: