8go / matrix-eno-bot

An admin and personal assistence Matrix bot built on matrix-nio and nio-template
Apache License 2.0
88 stars 15 forks source link

Python 3.12 compatibility #36

Closed Dual-0 closed 2 months ago

Dual-0 commented 6 months ago

I updated my server instances to Ubuntu 24.04 (noble) wich comes with python 3.12. With python 3.12 I get this deprecation warning: main.py:169: DeprecationWarning: There is no current event loop asyncio.get_event_loop().run_until_complete(main())

The warning encountering is due to a change in Python 3.10+, where asyncio.get_event_loop() no longer creates a new event loop if one doesn't already exist. Instead, we should use the asyncio.run() function to run the main coroutine.

8go commented 2 months ago

Thank you @Dual-0 :clap:

Fixed in e18c5cc2bbced2229f661a3b9a8bc022e2a7d808