diff --git a/CHANGES/13295.doc.rst b/CHANGES/13295.doc.rst new file mode 100644 index 00000000000..545c17bf3a7 --- /dev/null +++ b/CHANGES/13295.doc.rst @@ -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`. diff --git a/CHANGES/13336.doc.rst b/CHANGES/13336.doc.rst new file mode 100644 index 00000000000..a159ba00f04 --- /dev/null +++ b/CHANGES/13336.doc.rst @@ -0,0 +1,2 @@ +Added ``interlock-cb``, an aiohttp client circuit breaker middleware, to the +third-party libraries page -- by :user:`bagowix`. diff --git a/CHANGES/13520.bugfix.rst b/CHANGES/13520.bugfix.rst new file mode 100644 index 00000000000..61d59dc2fee --- /dev/null +++ b/CHANGES/13520.bugfix.rst @@ -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`. diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index d843e49b5f9..e4946d9b76d 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -155,6 +155,7 @@ Gary Leung Gary Wilson Jr. Gene Hoffman Gennady Andreyev +George Fifth Georges Dubus goingforstudying-ctrl Greg Holt diff --git a/aiohttp/_websocket/reader_py.py b/aiohttp/_websocket/reader_py.py index b22884cec62..a295db0a4a7 100644 --- a/aiohttp/_websocket/reader_py.py +++ b/aiohttp/_websocket/reader_py.py @@ -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 @@ -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 @@ -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 diff --git a/docs/streams.rst b/docs/streams.rst index d87e945e904..c74a0c1ad93 100644 --- a/docs/streams.rst +++ b/docs/streams.rst @@ -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. diff --git a/docs/third_party.rst b/docs/third_party.rst index 9cc7d017298..d8f9dc992c6 100644 --- a/docs/third_party.rst +++ b/docs/third_party.rst @@ -302,3 +302,7 @@ ask to raise the status. - `aiointercept `_ Mock aiohttp HTTP requests by routing them through a real aiohttp.web test server. + +- `interlock-cb `_ + 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.