From c919bfa616ed2fe412ffb0e2f5dcefae993436f8 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Mon, 26 Dec 2022 14:42:56 +0000 Subject: [PATCH] [3.9] Fix CI (#7143) --- .github/workflows/ci.yml | 4 ++-- aiohttp/helpers.py | 1 + docs/web_reference.rst | 2 +- tests/test_client_request.py | 4 ++-- tests/test_streams.py | 4 ++-- tests/test_web_app.py | 4 ++-- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba3792fa9fa..5c69e7bcc4f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,9 +59,9 @@ jobs: - name: Run linters run: | make mypy - - name: Install libenchant-dev + - name: Install libenchant run: | - sudo apt install libenchant-dev + sudo apt install libenchant-2-dev - name: Install spell checker run: | pip install -r requirements/doc-spelling.txt -c requirements/constraints.txt diff --git a/aiohttp/helpers.py b/aiohttp/helpers.py index 97eb6bca4b8..9b9b6e27688 100644 --- a/aiohttp/helpers.py +++ b/aiohttp/helpers.py @@ -69,6 +69,7 @@ PY_37 = sys.version_info >= (3, 7) PY_38 = sys.version_info >= (3, 8) PY_310 = sys.version_info >= (3, 10) +PY_311 = sys.version_info >= (3, 11) if sys.version_info < (3, 7): import idna_ssl diff --git a/docs/web_reference.rst b/docs/web_reference.rst index 487db4b135a..8b851cb9b47 100644 --- a/docs/web_reference.rst +++ b/docs/web_reference.rst @@ -3008,7 +3008,7 @@ Utilities .. versionadded:: 3.9 - Support handler_cancellation parameter (this was the default behaviour + Support handler_cancellation parameter (this was the default behavior in aiohttp <3.7). Constants diff --git a/tests/test_client_request.py b/tests/test_client_request.py index a3c30601700..9cbb40c8986 100644 --- a/tests/test_client_request.py +++ b/tests/test_client_request.py @@ -20,7 +20,7 @@ _gen_default_accept_encoding, _merge_ssl_params, ) -from aiohttp.helpers import PY_310 +from aiohttp.helpers import PY_311 from aiohttp.test_utils import make_mocked_coro @@ -277,7 +277,7 @@ def test_host_header_ipv6_with_port(make_request) -> None: @pytest.mark.xfail( - PY_310, + PY_311, reason="No idea why ClientRequest() is constructed out of loop but " "it calls `asyncio.get_event_loop()`", raises=DeprecationWarning, diff --git a/tests/test_streams.py b/tests/test_streams.py index 29eab256578..8e0cef8a1bd 100644 --- a/tests/test_streams.py +++ b/tests/test_streams.py @@ -12,7 +12,7 @@ from re_assert import Matches from aiohttp import streams -from aiohttp.helpers import PY_310 +from aiohttp.helpers import PY_311 DATA = b"line1\nline2\nline3\n" @@ -84,7 +84,7 @@ async def test_create_waiter(self) -> None: await stream._wait("test") @pytest.mark.xfail( - PY_310, + PY_311, reason="No idea why ClientRequest() is constructed out of loop but " "it calls `asyncio.get_event_loop()`", raises=DeprecationWarning, diff --git a/tests/test_web_app.py b/tests/test_web_app.py index 76eb5a2f73c..39d1acde835 100644 --- a/tests/test_web_app.py +++ b/tests/test_web_app.py @@ -7,7 +7,7 @@ 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, PY_311 from aiohttp.test_utils import make_mocked_coro from aiohttp.typedefs import Handler @@ -41,7 +41,7 @@ async def test_set_loop() -> None: @pytest.mark.xfail( - PY_310, + PY_311, reason="No idea why _set_loop() is constructed out of loop " "but it calls `asyncio.get_event_loop()`", raises=DeprecationWarning,