python-aiohttp/py3109-compat.patch
Daniel Garcia 792689dd2d - Add Update-update_query-calls-to-work-with-latest-yarl.patch to fix
problems with latest python-yarl
- Delete aiohttp-pr7057-bump-charset-normalizer.patch not needed
  anymore
- Update to 3.8.4:
  * Fixed incorrectly overwriting cookies with the same name and
    domain, but different path. (#6638)
  * Fixed ConnectionResetError not being raised after client
    disconnection in SSL environments. (#7180)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aiohttp?expand=0&rev=90
2023-04-26 07:39:50 +00:00

91 lines
2.8 KiB
Diff

Index: aiohttp-3.8.4/tests/test_client_request.py
===================================================================
--- aiohttp-3.8.4.orig/tests/test_client_request.py
+++ aiohttp-3.8.4/tests/test_client_request.py
@@ -2,6 +2,7 @@ import asyncio
import hashlib
import io
import os.path
+import sys
import urllib.parse
import zlib
from http.cookies import BaseCookie, Morsel, SimpleCookie
@@ -19,7 +20,6 @@ from aiohttp.client_reqrep import (
Fingerprint,
_merge_ssl_params,
)
-from aiohttp.helpers import PY_311
from aiohttp.test_utils import make_mocked_coro
@@ -276,7 +276,7 @@ def test_host_header_ipv6_with_port(make
@pytest.mark.xfail(
- PY_311,
+ sys.version_info >= (3, 10) and sys.version_info < (3, 10, 9),
reason="No idea why ClientRequest() is constructed out of loop but "
"it calls `asyncio.get_event_loop()`",
raises=DeprecationWarning,
Index: aiohttp-3.8.4/tests/test_streams.py
===================================================================
--- aiohttp-3.8.4.orig/tests/test_streams.py
+++ aiohttp-3.8.4/tests/test_streams.py
@@ -4,6 +4,7 @@ import abc
import asyncio
import gc
import types
+import sys
from collections import defaultdict
from itertools import groupby
from unittest import mock
@@ -12,7 +13,6 @@ import pytest
from re_assert import Matches
from aiohttp import streams
-from aiohttp.helpers import PY_311
DATA = b"line1\nline2\nline3\n"
@@ -84,7 +84,7 @@ class TestStreamReader:
await stream._wait("test")
@pytest.mark.xfail(
- PY_311,
+ sys.version_info >= (3, 10) and sys.version_info < (3, 10, 9),
reason="No idea why ClientRequest() is constructed out of loop but "
"it calls `asyncio.get_event_loop()`",
raises=DeprecationWarning,
Index: aiohttp-3.8.4/tests/test_web_app.py
===================================================================
--- aiohttp-3.8.4.orig/tests/test_web_app.py
+++ aiohttp-3.8.4/tests/test_web_app.py
@@ -1,12 +1,13 @@
import asyncio
import gc
+import sys
from unittest import mock
import pytest
from aiohttp import log, web
from aiohttp.abc import AbstractAccessLogger, AbstractRouter
-from aiohttp.helpers import DEBUG, PY_36, PY_311
+from aiohttp.helpers import DEBUG, PY_36
from aiohttp.test_utils import make_mocked_coro
from aiohttp.typedefs import Handler
@@ -40,9 +41,9 @@ async def test_set_loop() -> None:
@pytest.mark.xfail(
- PY_311,
- reason="No idea why _set_loop() is constructed out of loop "
- "but it calls `asyncio.get_event_loop()`",
+ sys.version_info >= (3, 10) and sys.version_info < (3, 10, 9),
+ reason="No idea why ClientRequest() is constructed out of loop but "
+ "it calls `asyncio.get_event_loop()`",
raises=DeprecationWarning,
)
def test_set_loop_default_loop() -> None: