TeamPGM / PagerMaid-Pyro

Advanced Multi-Featured Telegram UserBot by pyrogram.
GNU Affero General Public License v3.0
620 stars 73 forks source link

fix: avoid using `asyncio.get_event_loop` #58

Closed ricky8955555 closed 9 months ago

ricky8955555 commented 1 year ago

Description

Please carefully read the Contributing note and Code of conduct before making any pull requests. And, Do not make a pull request to merge into master unless it is a hotfix. Use the development branch instead.

Issues fixed by this PR

41

The behaviour of creating a new event loop if one doesn't already exist was removed in Python 3.12 alpha and was allegedly deprecated before then.

The get_event_loop() method of the default event loop policy now emits a DeprecationWarning if there is no current event loop set and it decides to create one. (Contributed by Serhiy Storchaka and Guido van Rossum in gh-100160.)

(see https://docs.python.org/3.12/whatsnew/3.12.html#deprecated)

Type of changes

Checklist: