Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions CHANGES/13295.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Corrected the documented signature of :meth:`~aiohttp.StreamReader.read_nowait`,
whose ``n`` parameter defaults to ``-1`` rather than the ``None`` that was
previously documented -- by :user:`LALITH0110`.
2 changes: 2 additions & 0 deletions CHANGES/13336.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Added ``interlock-cb``, an aiohttp client circuit breaker middleware, to the
third-party libraries page -- by :user:`bagowix`.
5 changes: 5 additions & 0 deletions CHANGES/13520.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Fixed Cython 3.3.0 failing to compile the WebSocket reader: dropped the
``Final[...]`` annotation from ``ALLOWED_CLOSE_CODES`` and the ``int``
annotation from the local ``start_pos`` in ``WebSocketReader._feed_data``,
both of which conflicted with declarations in ``reader_c.pxd`` under
Cython 3.3.0 -- by :user:`Georgefifth`.
1 change: 1 addition & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ Gary Leung
Gary Wilson Jr.
Gene Hoffman
Gennady Andreyev
George Fifth
Georges Dubus
goingforstudying-ctrl
Greg Holt
Expand Down
5 changes: 2 additions & 3 deletions aiohttp/_websocket/reader_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import builtins
import sys
from collections import deque
from typing import Final

from ..base_protocol import BaseProtocol
from ..compression_utils import TooManyMembersError, ZLibDecompressor
Expand All @@ -25,7 +24,7 @@
WSMsgType,
)

ALLOWED_CLOSE_CODES: Final[set[int]] = {int(i) for i in WSCloseCode}
ALLOWED_CLOSE_CODES: set[int] = {int(i) for i in WSCloseCode}

# States for the reader, used to parse the WebSocket frame
# integer values are used so they can be cythonized
Expand Down Expand Up @@ -353,7 +352,7 @@ def _feed_data(self, data: bytes) -> None:
if self._tail:
data, self._tail = self._tail + data, b""

start_pos: int = 0
start_pos = 0
data_len = len(data)
data_cstr = data

Expand Down
2 changes: 1 addition & 1 deletion docs/streams.rst
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ Helpers

Return ``True`` if the buffer is empty and EOF was reached.

.. method:: StreamReader.read_nowait(n=None)
.. method:: StreamReader.read_nowait(n=-1)

Returns data from internal buffer if any, empty bytes object otherwise.

Expand Down
4 changes: 4 additions & 0 deletions docs/third_party.rst
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,7 @@ ask to raise the status.

- `aiointercept <https://github.com/Polandia94/aiointercept>`_
Mock aiohttp HTTP requests by routing them through a real aiohttp.web test server.

- `interlock-cb <https://github.com/bagowix/interlock>`_
Circuit breaker middleware for aiohttp clients with one breaker per host; it fails fast
while a host is degraded and trips on failure rate or slow responses.
Loading