Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
613a3f0
Increment version to 3.11.14.dev0
bdraco Feb 24, 2025
f4cdb6e
[PR #10493/8e8fa959 backport][3.12] Document adjustments to the relea…
patchback[bot] Feb 26, 2025
40fe535
[PR #10493/8e8fa959 backport][3.11] Document adjustments to the relea…
patchback[bot] Feb 26, 2025
6ede5e0
Bump setuptools from 75.8.0 to 75.8.1 (#10498)
dependabot[bot] Feb 26, 2025
470ae18
Bump setuptools from 75.8.1 to 75.8.2 (#10499)
dependabot[bot] Feb 27, 2025
f1a4d2e
Bump actions/cache from 4.2.1 to 4.2.2 (#10503)
dependabot[bot] Feb 28, 2025
5124966
Bump sphinxcontrib-towncrier from 0.4.0a0 to 0.5.0a0 (#10504)
dependabot[bot] Feb 28, 2025
f5d4140
Bump pypa/cibuildwheel from 2.22.0 to 2.23.0 (#10511)
dependabot[bot] Mar 4, 2025
29ca843
Bump pytest from 8.3.4 to 8.3.5 (#10510)
dependabot[bot] Mar 4, 2025
9ccca25
Bump cryptography from 44.0.1 to 44.0.2 (#10509)
dependabot[bot] Mar 4, 2025
bc3e5cd
Bump aiohappyeyeballs from 2.4.6 to 2.4.8 (#10517)
dependabot[bot] Mar 4, 2025
76a9dc6
Bump aiohappyeyeballs from 2.4.8 to 2.5.0 (#10523)
dependabot[bot] Mar 6, 2025
2761ce8
Bump jinja2 from 3.1.5 to 3.1.6 (#10522)
dependabot[bot] Mar 6, 2025
505d307
Bump virtualenv from 20.29.2 to 20.29.3 (#10527)
dependabot[bot] Mar 7, 2025
e1ef02d
Bump setuptools from 75.8.2 to 76.0.0 (#10530)
dependabot[bot] Mar 10, 2025
98804dc
Bump identify from 2.6.8 to 2.6.9 (#10531)
dependabot[bot] Mar 10, 2025
c1fdd1a
Bump attrs from 25.1.0 to 25.2.0 (#10537)
dependabot[bot] Mar 12, 2025
532cf65
Bump stamina from 24.3.0 to 25.1.0 (#10538)
dependabot[bot] Mar 12, 2025
0b17481
Bump aiohappyeyeballs from 2.5.0 to 2.6.1 (#10539)
dependabot[bot] Mar 14, 2025
1f30911
Bump attrs from 25.2.0 to 25.3.0 (#10546)
dependabot[bot] Mar 15, 2025
e9b657f
Bump filelock from 3.17.0 to 3.18.0 (#10547)
dependabot[bot] Mar 15, 2025
7205661
[PR #10553/55c5f1fc backport][3.11] Add benchmark for JSON post reque…
patchback[bot] Mar 15, 2025
f390621
[PR #10553/55c5f1fc backport][3.12] Add benchmark for JSON post reque…
patchback[bot] Mar 15, 2025
928e6d7
[PR #10552/44e669be backport][3.11] Cache parsing of the content-type…
patchback[bot] Mar 15, 2025
a95e38f
[PR #10552/44e669be backport][3.12] Cache parsing of the content-type…
patchback[bot] Mar 15, 2025
e9f3f03
[PR #10529/492f63dc backport][3.11] Fixed bug that lead to infinite w…
patchback[bot] Mar 16, 2025
25c9ab8
[PR #10529/492f63dc backport][3.12] Fixed bug that lead to infinite w…
patchback[bot] Mar 16, 2025
6357c05
[PR #10551/d067260d backport][3.11] Re-raise OSError as ClientConnect…
patchback[bot] Mar 16, 2025
a3c36ad
[PR #10551/d067260d backport][3.12] Re-raise OSError as ClientConnect…
patchback[bot] Mar 16, 2025
077e4fa
[PR #10556/9d4e1161 backport][3.12] Break cyclic references at connec…
patchback[bot] Mar 16, 2025
771d203
[PR #10556/9d4e1161 backport][3.11] Break cyclic references at connec…
patchback[bot] Mar 16, 2025
6ae2570
[PR #10569/dfbf782b backport][3.11] Break cyclic references when ther…
patchback[bot] Mar 16, 2025
8337927
[PR #10569/dfbf782b backport][3.12] Break cyclic references when ther…
patchback[bot] Mar 16, 2025
240fb9e
[PR #10534/3b9bb1cd backport][3.12] Replace tcp_sockopts with socket_…
bdraco Mar 16, 2025
4005080
[PR #10564/a59e74b7 backport][3.11] Log offending websocket client ad…
patchback[bot] Mar 16, 2025
70036a9
[PR #10564/a59e74b7 backport][3.12] Log offending websocket client ad…
patchback[bot] Mar 16, 2025
e1d2d77
only use `AI_ADDRCONFIG` when supported by getaddrinfo (#10542)
maxbachmann Mar 16, 2025
3c60cd2
Parametrize leak tests (#10577)
bdraco Mar 16, 2025
9396ef1
[PR #10542/e1d2d77c backport][3.11] only use `AI_ADDRCONFIG` when sup…
patchback[bot] Mar 16, 2025
666523b
[PR #10542/e1d2d77c backport][3.12] only use `AI_ADDRCONFIG` when sup…
patchback[bot] Mar 16, 2025
c6fedfa
[PR #10577/3c60cd22 backport][3.12] Parametrize leak tests (#10581)
patchback[bot] Mar 16, 2025
d40e227
[PR #10577/3c60cd22 backport][3.11] Parametrize leak tests (#10580)
patchback[bot] Mar 17, 2025
1a48a62
Release 3.11.14 (#10582)
bdraco Mar 17, 2025
cc13d96
Merge branch '3.11' into 3.12
bdraco Mar 17, 2025
28832b8
Merge branch '3.12'
bdraco Mar 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,83 @@

.. towncrier release notes start

3.11.14 (2025-03-16)
====================

Bug fixes
---------

- Fixed an issue where dns queries were delayed indefinitely when an exception occurred in a ``trace.send_dns_cache_miss``
-- by :user:`logioniz`.


*Related issues and pull requests on GitHub:*
:issue:`10529`.



- Fixed DNS resolution on platforms that don't support ``socket.AI_ADDRCONFIG`` -- by :user:`maxbachmann`.


*Related issues and pull requests on GitHub:*
:issue:`10542`.



- The connector now raises :exc:`aiohttp.ClientConnectionError` instead of :exc:`OSError` when failing to explicitly close the socket after :py:meth:`asyncio.loop.create_connection` fails -- by :user:`bdraco`.


*Related issues and pull requests on GitHub:*
:issue:`10551`.



- Break cyclic references at connection close when there was a traceback -- by :user:`bdraco`.

Special thanks to :user:`availov` for reporting the issue.


*Related issues and pull requests on GitHub:*
:issue:`10556`.



- Break cyclic references when there is an exception handling a request -- by :user:`bdraco`.


*Related issues and pull requests on GitHub:*
:issue:`10569`.




Features
--------

- Improved logging on non-overlapping WebSocket client protocols to include the remote address -- by :user:`bdraco`.


*Related issues and pull requests on GitHub:*
:issue:`10564`.




Miscellaneous internal changes
------------------------------

- Improved performance of parsing content types by adding a cache in the same manner currently done with mime types -- by :user:`bdraco`.


*Related issues and pull requests on GitHub:*
:issue:`10552`.




----


3.11.13 (2025-02-24)
====================

Expand Down
2 changes: 0 additions & 2 deletions CHANGES/10529.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion CHANGES/10551.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion CHANGES/10552.misc.rst

This file was deleted.

3 changes: 0 additions & 3 deletions CHANGES/10556.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion CHANGES/10564.feature.rst

This file was deleted.

1 change: 0 additions & 1 deletion CHANGES/10569.bugfix.rst

This file was deleted.

7 changes: 5 additions & 2 deletions aiohttp/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

_NUMERIC_SOCKET_FLAGS = socket.AI_NUMERICHOST | socket.AI_NUMERICSERV
_NAME_SOCKET_FLAGS = socket.NI_NUMERICHOST | socket.NI_NUMERICSERV
_AI_ADDRCONFIG = socket.AI_ADDRCONFIG
if hasattr(socket, "AI_MASK"):
_AI_ADDRCONFIG &= socket.AI_MASK


class ThreadedResolver(AbstractResolver):
Expand All @@ -38,7 +41,7 @@ async def resolve(
port,
type=socket.SOCK_STREAM,
family=family,
flags=socket.AI_ADDRCONFIG,
flags=_AI_ADDRCONFIG,
)

hosts: List[ResolveResult] = []
Expand Down Expand Up @@ -96,7 +99,7 @@ async def resolve(
port=port,
type=socket.SOCK_STREAM,
family=family,
flags=socket.AI_ADDRCONFIG,
flags=_AI_ADDRCONFIG,
)
except aiodns.error.DNSError as exc:
msg = exc.args[1] if len(exc.args) >= 1 else "DNS lookup failed"
Expand Down
47 changes: 21 additions & 26 deletions tests/test_leaks.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,29 @@


@pytest.mark.skipif(IS_PYPY, reason="gc.DEBUG_LEAK not available on PyPy")
def test_client_response_does_not_leak_on_server_disconnected_error() -> None:
"""Test that ClientResponse is collected after server disconnects.

https://github.com/aio-libs/aiohttp/issues/10535
"""
leak_test_script = pathlib.Path(__file__).parent.joinpath(
"isolated", "check_for_client_response_leak.py"
)

with subprocess.Popen(
[sys.executable, "-u", str(leak_test_script)],
stdout=subprocess.PIPE,
) as proc:
assert proc.wait() == 0, "ClientResponse leaked"


@pytest.mark.skipif(IS_PYPY, reason="gc.DEBUG_LEAK not available on PyPy")
def test_request_does_not_leak_when_request_handler_raises() -> None:
"""Test that the Request object is collected when the handler raises.

https://github.com/aio-libs/aiohttp/issues/10548
"""
leak_test_script = pathlib.Path(__file__).parent.joinpath(
"isolated", "check_for_request_leak.py"
)
@pytest.mark.parametrize(
("script", "message"),
[
(
# Test that ClientResponse is collected after server disconnects.
# https://github.com/aio-libs/aiohttp/issues/10535
"check_for_client_response_leak.py",
"ClientResponse leaked",
),
(
# Test that Request object is collected when the handler raises.
# https://github.com/aio-libs/aiohttp/issues/10548
"check_for_request_leak.py",
"Request leaked",
),
],
)
def test_leak(script: str, message: str) -> None:
"""Run isolated leak test script and check for leaks."""
leak_test_script = pathlib.Path(__file__).parent.joinpath("isolated", script)

with subprocess.Popen(
[sys.executable, "-u", str(leak_test_script)],
stdout=subprocess.PIPE,
) as proc:
assert proc.wait() == 0, "Request leaked"
assert proc.wait() == 0, message
Loading