|
10 | 10 |
|
11 | 11 | .. towncrier release notes start
|
12 | 12 |
|
| 13 | +3.12.0 (2025-05-24) |
| 14 | +=================== |
| 15 | + |
| 16 | +Bug fixes |
| 17 | +--------- |
| 18 | + |
| 19 | +- Fixed :py:attr:`~aiohttp.web.WebSocketResponse.prepared` property to correctly reflect the prepared state, especially during timeout scenarios -- by :user:`bdraco` |
| 20 | + |
| 21 | + |
| 22 | + *Related issues and pull requests on GitHub:* |
| 23 | + :issue:`6009`, :issue:`10988`. |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | +- Response is now always True, instead of using MutableMapping behaviour (False when map is empty) |
| 28 | + |
| 29 | + |
| 30 | + *Related issues and pull requests on GitHub:* |
| 31 | + :issue:`10119`. |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | +- Fixed connection reuse for file-like data payloads by ensuring buffer |
| 36 | + truncation respects content-length boundaries and preventing premature |
| 37 | + connection closure race -- by :user:`bdraco`. |
| 38 | + |
| 39 | + |
| 40 | + *Related issues and pull requests on GitHub:* |
| 41 | + :issue:`10325`, :issue:`10915`, :issue:`10941`, :issue:`10943`. |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | +- Fixed pytest plugin to not use deprecated :py:mod:`asyncio` policy APIs. |
| 46 | + |
| 47 | + |
| 48 | + *Related issues and pull requests on GitHub:* |
| 49 | + :issue:`10851`. |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | +- Fixed :py:class:`~aiohttp.resolver.AsyncResolver` not using the ``loop`` argument in versions 3.x where it should still be supported -- by :user:`bdraco`. |
| 54 | + |
| 55 | + |
| 56 | + *Related issues and pull requests on GitHub:* |
| 57 | + :issue:`10951`. |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | +Features |
| 63 | +-------- |
| 64 | + |
| 65 | +- Added a comprehensive HTTP Digest Authentication client middleware (DigestAuthMiddleware) |
| 66 | + that implements RFC 7616. The middleware supports all standard hash algorithms |
| 67 | + (MD5, SHA, SHA-256, SHA-512) with session variants, handles both 'auth' and |
| 68 | + 'auth-int' quality of protection options, and automatically manages the |
| 69 | + authentication flow by intercepting 401 responses and retrying with proper |
| 70 | + credentials -- by :user:`feus4177`, :user:`TimMenninger`, and :user:`bdraco`. |
| 71 | + |
| 72 | + |
| 73 | + *Related issues and pull requests on GitHub:* |
| 74 | + :issue:`2213`, :issue:`10725`. |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | +- Added client middleware support -- by :user:`bdraco` and :user:`Dreamsorcerer`. |
| 79 | + |
| 80 | + This change allows users to add middleware to the client session and requests, enabling features like |
| 81 | + authentication, logging, and request/response modification without modifying the core |
| 82 | + request logic. Additionally, the ``session`` attribute was added to ``ClientRequest``, |
| 83 | + allowing middleware to access the session for making additional requests. |
| 84 | + |
| 85 | + |
| 86 | + *Related issues and pull requests on GitHub:* |
| 87 | + :issue:`9732`, :issue:`10902`, :issue:`10945`, :issue:`10952`, :issue:`10959`, :issue:`10968`. |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | +- Allow user setting zlib compression backend -- by :user:`TimMenninger` |
| 92 | + |
| 93 | + This change allows the user to call :func:`aiohttp.set_zlib_backend()` with the |
| 94 | + zlib compression module of their choice. Default behavior continues to use |
| 95 | + the builtin ``zlib`` library. |
| 96 | + |
| 97 | + |
| 98 | + *Related issues and pull requests on GitHub:* |
| 99 | + :issue:`9798`. |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | +- Added support for overriding the base URL with an absolute one in client sessions |
| 104 | + -- by :user:`vivodi`. |
| 105 | + |
| 106 | + |
| 107 | + *Related issues and pull requests on GitHub:* |
| 108 | + :issue:`10074`. |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | +- Added ``host`` parameter to ``aiohttp_server`` fixture -- by :user:`christianwbrock`. |
| 113 | + |
| 114 | + |
| 115 | + *Related issues and pull requests on GitHub:* |
| 116 | + :issue:`10120`. |
| 117 | + |
| 118 | + |
| 119 | + |
| 120 | +- Detect blocking calls in coroutines using BlockBuster -- by :user:`cbornet`. |
| 121 | + |
| 122 | + |
| 123 | + *Related issues and pull requests on GitHub:* |
| 124 | + :issue:`10433`. |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | +- Added ``socket_factory`` to :py:class:`aiohttp.TCPConnector` to allow specifying custom socket options |
| 129 | + -- by :user:`TimMenninger`. |
| 130 | + |
| 131 | + |
| 132 | + *Related issues and pull requests on GitHub:* |
| 133 | + :issue:`10474`, :issue:`10520`, :issue:`10961`, :issue:`10962`. |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | +- Started building armv7l manylinux wheels -- by :user:`bdraco`. |
| 138 | + |
| 139 | + |
| 140 | + *Related issues and pull requests on GitHub:* |
| 141 | + :issue:`10797`. |
| 142 | + |
| 143 | + |
| 144 | + |
| 145 | +- Implemented shared DNS resolver management to fix excessive resolver object creation |
| 146 | + when using multiple client sessions. The new ``_DNSResolverManager`` singleton ensures |
| 147 | + only one ``DNSResolver`` object is created for default configurations, significantly |
| 148 | + reducing resource usage and improving performance for applications using multiple |
| 149 | + client sessions simultaneously -- by :user:`bdraco`. |
| 150 | + |
| 151 | + |
| 152 | + *Related issues and pull requests on GitHub:* |
| 153 | + :issue:`10847`, :issue:`10923`, :issue:`10946`. |
| 154 | + |
| 155 | + |
| 156 | + |
| 157 | +- Upgraded to LLHTTP 9.3.0 -- by :user:`Dreamsorcerer`. |
| 158 | + |
| 159 | + |
| 160 | + *Related issues and pull requests on GitHub:* |
| 161 | + :issue:`10972`. |
| 162 | + |
| 163 | + |
| 164 | + |
| 165 | +- Optimized small HTTP requests/responses by coalescing headers and body into a single TCP packet -- by :user:`bdraco`. |
| 166 | + |
| 167 | + This change enhances network efficiency by reducing the number of packets sent for small HTTP payloads, improving latency and reducing overhead. Most importantly, this fixes compatibility with memory-constrained IoT devices that can only perform a single read operation and expect HTTP requests in one packet. The optimization uses zero-copy ``writelines`` when coalescing data and works with both regular and chunked transfer encoding. |
| 168 | + |
| 169 | + When ``aiohttp`` uses client middleware to communicate with an ``aiohttp`` server, connection reuse is more likely to occur since complete responses arrive in a single packet for small payloads. |
| 170 | + |
| 171 | + This aligns ``aiohttp`` with other popular HTTP clients that already coalesce small requests. |
| 172 | + |
| 173 | + |
| 174 | + *Related issues and pull requests on GitHub:* |
| 175 | + :issue:`10991`. |
| 176 | + |
| 177 | + |
| 178 | + |
| 179 | + |
| 180 | +Improved documentation |
| 181 | +---------------------- |
| 182 | + |
| 183 | +- Improved documentation for middleware by adding warnings and examples about |
| 184 | + request body stream consumption. The documentation now clearly explains that |
| 185 | + request body streams can only be read once and provides best practices for |
| 186 | + sharing parsed request data between middleware and handlers -- by :user:`bdraco`. |
| 187 | + |
| 188 | + |
| 189 | + *Related issues and pull requests on GitHub:* |
| 190 | + :issue:`2914`. |
| 191 | + |
| 192 | + |
| 193 | + |
| 194 | + |
| 195 | +Packaging updates and notes for downstreams |
| 196 | +------------------------------------------- |
| 197 | + |
| 198 | +- Removed non SPDX-license description from ``setup.cfg`` -- by :user:`devanshu-ziphq`. |
| 199 | + |
| 200 | + |
| 201 | + *Related issues and pull requests on GitHub:* |
| 202 | + :issue:`10662`. |
| 203 | + |
| 204 | + |
| 205 | + |
| 206 | +- Added support for building against system ``llhttp`` library -- by :user:`mgorny`. |
| 207 | + |
| 208 | + This change adds support for :envvar:`AIOHTTP_USE_SYSTEM_DEPS` environment variable that |
| 209 | + can be used to build aiohttp against the system install of the ``llhttp`` library rather |
| 210 | + than the vendored one. |
| 211 | + |
| 212 | + |
| 213 | + *Related issues and pull requests on GitHub:* |
| 214 | + :issue:`10759`. |
| 215 | + |
| 216 | + |
| 217 | + |
| 218 | +- ``aiodns`` is now installed on Windows with speedups extra -- by :user:`bdraco`. |
| 219 | + |
| 220 | + As of ``aiodns`` 3.3.0, ``SelectorEventLoop`` is no longer required when using ``pycares`` 4.7.0 or later. |
| 221 | + |
| 222 | + |
| 223 | + *Related issues and pull requests on GitHub:* |
| 224 | + :issue:`10823`. |
| 225 | + |
| 226 | + |
| 227 | + |
| 228 | +- Fixed compatibility issue with Cython 3.1.1 -- by :user:`bdraco` |
| 229 | + |
| 230 | + |
| 231 | + *Related issues and pull requests on GitHub:* |
| 232 | + :issue:`10877`. |
| 233 | + |
| 234 | + |
| 235 | + |
| 236 | + |
| 237 | +Contributor-facing changes |
| 238 | +-------------------------- |
| 239 | + |
| 240 | +- Sped up tests by disabling ``blockbuster`` fixture for ``test_static_file_huge`` and ``test_static_file_huge_cancel`` tests -- by :user:`dikos1337`. |
| 241 | + |
| 242 | + |
| 243 | + *Related issues and pull requests on GitHub:* |
| 244 | + :issue:`9705`, :issue:`10761`. |
| 245 | + |
| 246 | + |
| 247 | + |
| 248 | +- Updated tests to avoid using deprecated :py:mod:`asyncio` policy APIs and |
| 249 | + make it compatible with Python 3.14. |
| 250 | + |
| 251 | + |
| 252 | + *Related issues and pull requests on GitHub:* |
| 253 | + :issue:`10851`. |
| 254 | + |
| 255 | + |
| 256 | + |
| 257 | +- Added Winloop to test suite to support in the future -- by :user:`Vizonex`. |
| 258 | + |
| 259 | + |
| 260 | + *Related issues and pull requests on GitHub:* |
| 261 | + :issue:`10922`. |
| 262 | + |
| 263 | + |
| 264 | + |
| 265 | + |
| 266 | +Miscellaneous internal changes |
| 267 | +------------------------------ |
| 268 | + |
| 269 | +- Added support for the ``partitioned`` attribute in the ``set_cookie`` method. |
| 270 | + |
| 271 | + |
| 272 | + *Related issues and pull requests on GitHub:* |
| 273 | + :issue:`9870`. |
| 274 | + |
| 275 | + |
| 276 | + |
| 277 | +- Setting :attr:`aiohttp.web.StreamResponse.last_modified` to an unsupported type will now raise :exc:`TypeError` instead of silently failing -- by :user:`bdraco`. |
| 278 | + |
| 279 | + |
| 280 | + *Related issues and pull requests on GitHub:* |
| 281 | + :issue:`10146`. |
| 282 | + |
| 283 | + |
| 284 | + |
| 285 | + |
| 286 | +---- |
| 287 | + |
| 288 | + |
13 | 289 | 3.12.0rc1 (2025-05-24)
|
14 | 290 | ======================
|
15 | 291 |
|
|
0 commit comments