1
0
python-aiohttp/py3109-compat.patch
2022-12-12 11:34:39 +00:00

77 lines
2.5 KiB
Diff

Index: aiohttp-3.8.3/tests/test_client_request.py
===================================================================
--- aiohttp-3.8.3.orig/tests/test_client_request.py
+++ aiohttp-3.8.3/tests/test_client_request.py
@@ -19,7 +19,6 @@ from aiohttp.client_reqrep import (
Fingerprint,
_merge_ssl_params,
)
-from aiohttp.helpers import PY_310
from aiohttp.test_utils import make_mocked_coro
@@ -275,12 +274,6 @@ def test_host_header_ipv6_with_port(make
assert req.headers["HOST"] == "[::2]:99"
-@pytest.mark.xfail(
- PY_310,
- reason="No idea why ClientRequest() is constructed out of loop but "
- "it calls `asyncio.get_event_loop()`",
- raises=DeprecationWarning,
-)
def test_default_loop(loop) -> None:
asyncio.set_event_loop(loop)
req = ClientRequest("get", URL("http://python.org/"))
Index: aiohttp-3.8.3/tests/test_streams.py
===================================================================
--- aiohttp-3.8.3.orig/tests/test_streams.py
+++ aiohttp-3.8.3/tests/test_streams.py
@@ -12,7 +12,6 @@ import pytest
from re_assert import Matches
from aiohttp import streams
-from aiohttp.helpers import PY_310
DATA = b"line1\nline2\nline3\n"
@@ -83,12 +82,6 @@ class TestStreamReader:
with pytest.raises(RuntimeError):
await stream._wait("test")
- @pytest.mark.xfail(
- PY_310,
- reason="No idea why ClientRequest() is constructed out of loop but "
- "it calls `asyncio.get_event_loop()`",
- raises=DeprecationWarning,
- )
def test_ctor_global_loop(self) -> None:
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
Index: aiohttp-3.8.3/tests/test_web_app.py
===================================================================
--- aiohttp-3.8.3.orig/tests/test_web_app.py
+++ aiohttp-3.8.3/tests/test_web_app.py
@@ -6,7 +6,7 @@ import pytest
from aiohttp import log, web
from aiohttp.abc import AbstractAccessLogger, AbstractRouter
-from aiohttp.helpers import DEBUG, PY_36, PY_310
+from aiohttp.helpers import DEBUG, PY_36
from aiohttp.test_utils import make_mocked_coro
from aiohttp.typedefs import Handler
@@ -39,12 +39,6 @@ async def test_set_loop() -> None:
assert app.loop is loop
-@pytest.mark.xfail(
- PY_310,
- reason="No idea why _set_loop() is constructed out of loop "
- "but it calls `asyncio.get_event_loop()`",
- raises=DeprecationWarning,
-)
def test_set_loop_default_loop() -> None:
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)