Skip to content

Commit 912deb7

Browse files
committed
uv - EventLoopPolicy deprecation
DeprecationWarning: 'asyncio.AbstractEventLoopPolicy' is deprecated and slated for removal in Python 3.16
1 parent 7f67de4 commit 912deb7

5 files changed

Lines changed: 0 additions & 30 deletions

File tree

tests/apiv1_test.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import pytest
55
import pytest_asyncio
66

7-
import uvloop
87
from hypercorn.asyncio import serve
98
from hypercorn.config import Config
109

@@ -34,11 +33,6 @@ async def server(config):
3433
await task
3534

3635

37-
@pytest.fixture(scope="session")
38-
def event_loop_policy():
39-
return uvloop.EventLoopPolicy()
40-
41-
4236
@pytest_asyncio.fixture(loop_scope="session")
4337
async def client(server):
4438
api = await asyncio.to_thread(aiopenapi3.OpenAPI.load_sync, f"http://{server.bind[0]}/v1/openapi.json")

tests/apiv2_test.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import pytest
1212
import pytest_asyncio
1313

14-
import uvloop
1514
from hypercorn.asyncio import serve
1615
from hypercorn.config import Config
1716

@@ -39,11 +38,6 @@ def config(unused_tcp_port_factory):
3938
return c
4039

4140

42-
@pytest.fixture(scope="session")
43-
def event_loop_policy():
44-
return uvloop.EventLoopPolicy()
45-
46-
4741
@pytest_asyncio.fixture(loop_scope="session")
4842
async def server(config):
4943
event_loop = asyncio.get_running_loop()

tests/content_length_test.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import asyncio
22
import random
33

4-
import uvloop
54
from hypercorn.asyncio import serve
65
from hypercorn.config import Config
76
from fastapi import FastAPI, Request, Response, Query
@@ -36,11 +35,6 @@ async def server(config):
3635
await task
3736

3837

39-
@pytest.fixture(scope="session")
40-
def event_loop_policy():
41-
return uvloop.EventLoopPolicy()
42-
43-
4438
@pytest_asyncio.fixture(loop_scope="session")
4539
async def client(server):
4640
api = await aiopenapi3.OpenAPI.load_async(f"http://{server.bind[0]}/openapi.json")

tests/stream_test.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
from pathlib import Path
88

9-
import uvloop
109
from hypercorn.asyncio import serve
1110
from hypercorn.config import Config
1211
import pydantic
@@ -42,11 +41,6 @@ async def server(config):
4241
await task
4342

4443

45-
@pytest.fixture(scope="session")
46-
def event_loop_policy():
47-
return uvloop.EventLoopPolicy()
48-
49-
5044
@pytest_asyncio.fixture(loop_scope="session")
5145
async def client(server):
5246
api = await aiopenapi3.OpenAPI.load_async(f"http://{server.bind[0]}/openapi.json")

tests/tls_test.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import pytest
88
import pytest_asyncio
99

10-
import uvloop
1110
from hypercorn.asyncio import serve
1211
from hypercorn.config import Config
1312

@@ -104,11 +103,6 @@ async def wait_for_server(server):
104103
return server
105104

106105

107-
@pytest.fixture(scope="session")
108-
def event_loop_policy():
109-
return uvloop.EventLoopPolicy()
110-
111-
112106
class MutualTLSSecurity(Document):
113107
"""
114108
patch FastAPI description document to authenticate using mutualTLS

0 commit comments

Comments
 (0)