mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 01:54:53 +00:00
Automatic enable uvloop if available.
This commit is contained in:
parent
435b498d25
commit
250a636d6e
1 changed files with 9 additions and 0 deletions
|
|
@ -10,6 +10,15 @@ except ImportError as e:
|
|||
|
||||
from .utils.versions import Stage, Version
|
||||
|
||||
try:
|
||||
import uvloop
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
import asyncio
|
||||
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
|
||||
|
||||
|
||||
VERSION = Version(1, 0, 3, stage=Stage.DEV, build=0)
|
||||
API_VERSION = Version(3, 5)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue