From 25b49dceadfc318df0ad695a29b65b9b82f29925 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 19 Nov 2024 09:07:54 -0600 Subject: [PATCH 1/6] Increment version to 3.11.6.dev0 (#9993) --- aiohttp/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiohttp/__init__.py b/aiohttp/__init__.py index 22610ffdb83..d4a9b99b54c 100644 --- a/aiohttp/__init__.py +++ b/aiohttp/__init__.py @@ -1,4 +1,4 @@ -__version__ = "3.11.5" +__version__ = "3.11.6.dev0" from typing import TYPE_CHECKING, Tuple From 81c33ec147a9ee21edb80970a37e68df4e039567 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:41:18 +0000 Subject: [PATCH 2/6] [PR #9991/7bbbd126 backport][3.11] Increase allowed benchmark run time to 7 minutes (#9995) Co-authored-by: J. Nick Koston --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 24107f89e10..2a9dbfa273b 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -244,7 +244,7 @@ jobs: needs: gen_llhttp runs-on: ubuntu-latest - timeout-minutes: 5 + timeout-minutes: 7 steps: - name: Checkout project uses: actions/checkout@v4 From f6c7050001982440df35f98f9106d71acfbbdd9e Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:41:25 +0000 Subject: [PATCH 3/6] [PR #9991/7bbbd126 backport][3.12] Increase allowed benchmark run time to 7 minutes (#9996) Co-authored-by: J. Nick Koston --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 24107f89e10..2a9dbfa273b 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -244,7 +244,7 @@ jobs: needs: gen_llhttp runs-on: ubuntu-latest - timeout-minutes: 5 + timeout-minutes: 7 steps: - name: Checkout project uses: actions/checkout@v4 From b7e3b300369d2b8c1a1bd1e269bf23b51dc0d8ce Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 19 Nov 2024 12:43:51 -0600 Subject: [PATCH 4/6] [PR #9997/8c36b51 backport][3.11] Restore the ``force_close`` method to the ``ResponseHandler`` (#9998) --- CHANGES/9997.bugfix.rst | 1 + aiohttp/client_proto.py | 3 +++ tests/test_client_proto.py | 14 +++++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 CHANGES/9997.bugfix.rst diff --git a/CHANGES/9997.bugfix.rst b/CHANGES/9997.bugfix.rst new file mode 100644 index 00000000000..2081ab6855b --- /dev/null +++ b/CHANGES/9997.bugfix.rst @@ -0,0 +1 @@ +Restored the ``force_close`` method to the ``ResponseHandler`` -- by :user:`bdraco`. diff --git a/aiohttp/client_proto.py b/aiohttp/client_proto.py index 2c1fc6af3ef..b899908d786 100644 --- a/aiohttp/client_proto.py +++ b/aiohttp/client_proto.py @@ -60,6 +60,9 @@ def should_close(self) -> bool: or self._tail ) + def force_close(self) -> None: + self._should_close = True + def close(self) -> None: transport = self.transport if transport is not None: diff --git a/tests/test_client_proto.py b/tests/test_client_proto.py index ba45d6a6839..a70dc62e135 100644 --- a/tests/test_client_proto.py +++ b/tests/test_client_proto.py @@ -1,3 +1,4 @@ +import asyncio from unittest import mock from yarl import URL @@ -9,7 +10,18 @@ from aiohttp.helpers import TimerNoop -async def test_oserror(loop) -> None: +async def test_force_close(loop: asyncio.AbstractEventLoop) -> None: + """Ensure that the force_close method sets the should_close attribute to True. + + This is used externally in aiodocker + https://github.com/aio-libs/aiodocker/issues/920 + """ + proto = ResponseHandler(loop=loop) + proto.force_close() + assert proto.should_close + + +async def test_oserror(loop: asyncio.AbstractEventLoop) -> None: proto = ResponseHandler(loop=loop) transport = mock.Mock() proto.connection_made(transport) From c266fc770ab167da6e9af11ca2f345b694270b7b Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 19 Nov 2024 12:52:40 -0600 Subject: [PATCH 5/6] [PR #9997/8c36b51 backport][3.12] Restore the ``force_close`` method to the ``ResponseHandler`` (#9999) --- CHANGES/9997.bugfix.rst | 1 + aiohttp/client_proto.py | 3 +++ tests/test_client_proto.py | 14 +++++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 CHANGES/9997.bugfix.rst diff --git a/CHANGES/9997.bugfix.rst b/CHANGES/9997.bugfix.rst new file mode 100644 index 00000000000..2081ab6855b --- /dev/null +++ b/CHANGES/9997.bugfix.rst @@ -0,0 +1 @@ +Restored the ``force_close`` method to the ``ResponseHandler`` -- by :user:`bdraco`. diff --git a/aiohttp/client_proto.py b/aiohttp/client_proto.py index 2c1fc6af3ef..b899908d786 100644 --- a/aiohttp/client_proto.py +++ b/aiohttp/client_proto.py @@ -60,6 +60,9 @@ def should_close(self) -> bool: or self._tail ) + def force_close(self) -> None: + self._should_close = True + def close(self) -> None: transport = self.transport if transport is not None: diff --git a/tests/test_client_proto.py b/tests/test_client_proto.py index ba45d6a6839..a70dc62e135 100644 --- a/tests/test_client_proto.py +++ b/tests/test_client_proto.py @@ -1,3 +1,4 @@ +import asyncio from unittest import mock from yarl import URL @@ -9,7 +10,18 @@ from aiohttp.helpers import TimerNoop -async def test_oserror(loop) -> None: +async def test_force_close(loop: asyncio.AbstractEventLoop) -> None: + """Ensure that the force_close method sets the should_close attribute to True. + + This is used externally in aiodocker + https://github.com/aio-libs/aiodocker/issues/920 + """ + proto = ResponseHandler(loop=loop) + proto.force_close() + assert proto.should_close + + +async def test_oserror(loop: asyncio.AbstractEventLoop) -> None: proto = ResponseHandler(loop=loop) transport = mock.Mock() proto.connection_made(transport) From ff9602d5bea624a6aa05e64a3dea56499a9d7c52 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 19 Nov 2024 13:04:14 -0600 Subject: [PATCH 6/6] Release 3.11.6 (#10000) --- CHANGES.rst | 18 ++++++++++++++++++ CHANGES/9997.bugfix.rst | 1 - aiohttp/__init__.py | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) delete mode 100644 CHANGES/9997.bugfix.rst diff --git a/CHANGES.rst b/CHANGES.rst index cc03af28632..4a8fc39b1f5 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -10,6 +10,24 @@ .. towncrier release notes start +3.11.6 (2024-11-19) +=================== + +Bug fixes +--------- + +- Restored the ``force_close`` method to the ``ResponseHandler`` -- by :user:`bdraco`. + + + *Related issues and pull requests on GitHub:* + :issue:`9997`. + + + + +---- + + 3.11.5 (2024-11-19) =================== diff --git a/CHANGES/9997.bugfix.rst b/CHANGES/9997.bugfix.rst deleted file mode 100644 index 2081ab6855b..00000000000 --- a/CHANGES/9997.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Restored the ``force_close`` method to the ``ResponseHandler`` -- by :user:`bdraco`. diff --git a/aiohttp/__init__.py b/aiohttp/__init__.py index d4a9b99b54c..03f92752f81 100644 --- a/aiohttp/__init__.py +++ b/aiohttp/__init__.py @@ -1,4 +1,4 @@ -__version__ = "3.11.6.dev0" +__version__ = "3.11.6" from typing import TYPE_CHECKING, Tuple