eventloop: remove deprecated uvloop method

Starting in Python 3.12 uvloop.install() is deprecated.  Directly
set the event_loop_policy as advised by the documentation.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2024-01-07 19:51:48 -05:00
parent 6e6388d673
commit 27a0295218
No known key found for this signature in database
GPG Key ID: 5A1EB336DFB4C71B
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ _uvl_enabled = False
if _uvl_var in ["y", "yes", "true"]:
with contextlib.suppress(ImportError):
import uvloop
uvloop.install()
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
_uvl_enabled = True
if TYPE_CHECKING: