Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8ce1c14
Increment version to 3.11.11.dev0 (#10130)
bdraco Dec 6, 2024
7b86843
[PR #10131/7f92bebb backport][3.11] Bump Python version for benchmark…
patchback[bot] Dec 6, 2024
0e4a0e4
[PR #10131/7f92bebb backport][3.12] Bump Python version for benchmark…
patchback[bot] Dec 6, 2024
87f0f48
Bump actions/cache from 4.1.2 to 4.2.0 (#10136)
dependabot[bot] Dec 6, 2024
489b664
[PR #10138/dbd77ad6 backport][3.11] Bump sphinx to 8.1.3 along with r…
patchback[bot] Dec 6, 2024
f52f60a
[PR #10138/dbd77ad6 backport][3.12] Bump sphinx to 8.1.3 along with r…
patchback[bot] Dec 6, 2024
eb42db8
Fix type of SSLContext for some static type checkers (#10099) (#10144)
Dreamsorcerer Dec 8, 2024
b770b1a
Fix type of SSLContext for some static type checkers (#10099) (#10145)
Dreamsorcerer Dec 8, 2024
51cdda8
Add host parameter to aiohttp_server fixture (#10120) (#10121) (#10150)
Dreamsorcerer Dec 9, 2024
7f38913
[PR #10154/3f07b1a3 backport][3.11] Update StreamResponse.write annot…
patchback[bot] Dec 11, 2024
5d9d830
[PR #10154/3f07b1a3 backport][3.12] Update StreamResponse.write annot…
patchback[bot] Dec 11, 2024
f38d51c
[PR #10146/a818e51c backport][3.12] Raise `TypeError` when setting `S…
patchback[bot] Dec 12, 2024
99a3737
[PR #10156/00700458 backport][3.12] Add ALPN extension to client SSL …
patchback[bot] Dec 12, 2024
3680479
[PR #10156/00700458 backport][3.11] Add ALPN extension to client SSL …
patchback[bot] Dec 12, 2024
c80be67
[PR #10151/7c12b1a9 backport][3.11] Fix infinite callback loop when t…
patchback[bot] Dec 17, 2024
5afac55
[PR #10151/7c12b1a9 backport][3.12] Fix infinite callback loop when t…
patchback[bot] Dec 17, 2024
8c96a62
[PR #10093/7b5d54a backport][3.11] Use `quote_cookie` setting from Cl…
bdraco Dec 17, 2024
86e2140
[PR #10093/7b5d54a backport][3.12] Use `quote_cookie` setting from Cl…
bdraco Dec 17, 2024
d7e4e61
[PR #10172/e45c3b8e backport][3.12] Ensure Response is True even when…
patchback[bot] Dec 18, 2024
5185f93
Stream unpauses protocol before releasing connection (#10171)
javitonino Dec 18, 2024
db56d74
[PR #10171/5185f93 backport][3.11] Stream unpauses protocol before re…
bdraco Dec 18, 2024
a3a5716
[PR #10171/5185f93 backport][3.12] Stream unpauses protocol before re…
bdraco Dec 18, 2024
8aaaba3
Release 3.11.11 (#10181)
bdraco Dec 18, 2024
acebc68
Merge branch '3.11' into 3.12
bdraco Dec 18, 2024
9c0f3d0
Merge branch '3.12'
bdraco Dec 18, 2024
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
74 changes: 74 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,80 @@

.. towncrier release notes start

3.11.11 (2024-12-18)
====================

Bug fixes
---------

- Updated :py:meth:`~aiohttp.ClientSession.request` to reuse the ``quote_cookie`` setting from ``ClientSession._cookie_jar`` when processing cookies parameter.
-- by :user:`Cycloctane`.


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



- Fixed type of ``SSLContext`` for some static type checkers (e.g. pyright).


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



- Updated :meth:`aiohttp.web.StreamResponse.write` annotation to also allow :class:`bytearray` and :class:`memoryview` as inputs -- by :user:`cdce8p`.


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



- Fixed a hang where a connection previously used for a streaming
download could be returned to the pool in a paused state.
-- by :user:`javitonino`.


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




Features
--------

- Enabled ALPN on default SSL contexts. This improves compatibility with some
proxies which don't work without this extension.
-- by :user:`Cycloctane`.


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




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

- Fixed an infinite loop that can occur when using aiohttp in combination
with `async-solipsism`_ -- by :user:`bmerry`.

.. _async-solipsism: https://github.com/bmerry/async-solipsism


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




----


3.11.10 (2024-12-05)
====================

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

This file was deleted.

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

This file was deleted.

4 changes: 0 additions & 4 deletions CHANGES/10149.misc.rst

This file was deleted.

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

This file was deleted.

3 changes: 0 additions & 3 deletions CHANGES/10156.feature.rst

This file was deleted.

1 change: 1 addition & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ Jan Buchar
Jan Gosmann
Jarno Elonen
Jashandeep Sohi
Javier Torres
Jean-Baptiste Estival
Jens Steinhauser
Jeonghun Lee
Expand Down
3 changes: 3 additions & 0 deletions aiohttp/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ def feed_eof(self) -> None:
self._eof_waiter = None
set_result(waiter, None)

if self._protocol._reading_paused:
self._protocol.resume_reading()

for cb in self._eof_callbacks:
try:
cb()
Expand Down
22 changes: 22 additions & 0 deletions tests/test_flowcontrol_streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,25 @@ async def test_read_nowait(self, stream: streams.StreamReader) -> None:
res = stream.read_nowait(5)
assert res == b""
assert stream._protocol.resume_reading.call_count == 1 # type: ignore[attr-defined]

async def test_resumed_on_eof(self, stream: streams.StreamReader) -> None:
stream.feed_data(b"data")
assert stream._protocol.pause_reading.call_count == 1 # type: ignore[attr-defined]
assert stream._protocol.resume_reading.call_count == 0 # type: ignore[attr-defined]
stream._protocol._reading_paused = True

stream.feed_eof()
assert stream._protocol.resume_reading.call_count == 1 # type: ignore[attr-defined]


async def test_stream_reader_eof_when_full() -> None:
loop = asyncio.get_event_loop()
protocol = BaseProtocol(loop=loop)
protocol.transport = asyncio.Transport()
stream = streams.StreamReader(protocol, 1024, loop=loop)

data_len = stream._high_water + 1
stream.feed_data(b"0" * data_len)
assert protocol._reading_paused
stream.feed_eof()
assert not protocol._reading_paused
Loading