Releases: aio-libs/aiohttp
3.13.1
Features
-
Make configuration options in
AppRunneralso available inrun_app()
-- by :user:Cycloctane.Related issues and pull requests on GitHub:
#11633.
Bug fixes
-
Switched to
backports.zstdfor Python <3.14 and fixed zstd decompression for chunked zstd streams -- by :user:ZhaoMJ.Note: Users who installed
zstandardfor support on Python <3.14 will now need to install
backports.zstdinstead (installingaiohttp[speedups]will do this automatically).Related issues and pull requests on GitHub:
#11623. -
Updated
Content-Typeheader parsing to returnapplication/octet-streamwhen header contains invalid syntax.
See :rfc:9110#section-8.3-5.-- by :user:
sgaist.Related issues and pull requests on GitHub:
#10889. -
Fixed Python 3.14 support when built without
zstdsupport -- by :user:JacobHenner.Related issues and pull requests on GitHub:
#11603. -
Fixed blocking I/O in the event loop when using netrc authentication by moving netrc file lookup to an executor -- by :user:
bdraco.Related issues and pull requests on GitHub:
#11634. -
Fixed routing to a sub-application added via
.add_domain()not working
if the same path exists on the parent app. -- by :user:Dreamsorcerer.Related issues and pull requests on GitHub:
#11673.
Packaging updates and notes for downstreams
-
Moved core packaging metadata from :file:
setup.cfgto :file:pyproject.tomlper :pep:621
-- by :user:cdce8p.Related issues and pull requests on GitHub:
#9951.
3.13.0
Features
-
Added support for Python 3.14.
-
Added support for free-threading in Python 3.14+ -- by :user:
kumaraditya303. -
Added support for Zstandard (aka Zstd) compression
-- by :user:KGuillaume-chaps.Related issues and pull requests on GitHub:
#11161. -
Added
StreamReader.total_raw_bytesto check the number of bytes downloaded
-- by :user:robpats.Related issues and pull requests on GitHub:
#11483.
Bug fixes
-
Fixed pytest plugin to not use deprecated :py:mod:
asynciopolicy APIs.Related issues and pull requests on GitHub:
#10851. -
Updated
Content-Dispositionheader parsing to handle trailing semicolons and empty parts
-- by :user:PLPeeters.Related issues and pull requests on GitHub:
#11243. -
Fixed saved
CookieJarfailing to be loaded if cookies havepartitionedflag when
http.cookiedoes not have partitioned cookies supports. -- by :user:Cycloctane.Related issues and pull requests on GitHub:
#11523.
Improved documentation
-
Added
Wireupto third-party libraries -- by :user:maldoinc.Related issues and pull requests on GitHub:
#11233.
Packaging updates and notes for downstreams
-
The
blockbustertest dependency is now optional; the corresponding test fixture is disabled when it is unavailable
-- by :user:musicinybrain.Related issues and pull requests on GitHub:
#11363. -
Added
riscv64build to releases -- by :user:eshattow.Related issues and pull requests on GitHub:
#11425.
Contributor-facing changes
-
Fixed
test_send_compress_textfailing when alternative zlib implementation
is used. (zlib-ngin python 3.14 windows build) -- by :user:Cycloctane.Related issues and pull requests on GitHub:
#11546.
3.12.15
Bug fixes
-
Fixed :class:
~aiohttp.DigestAuthMiddlewareto preserve the algorithm case from the server's challenge in the authorization response. This improves compatibility with servers that perform case-sensitive algorithm matching (e.g., servers expectingalgorithm=MD5-sessinstead ofalgorithm=MD5-SESS)
-- by :user:bdraco.Related issues and pull requests on GitHub:
#11352.
Improved documentation
-
Remove outdated contents of
aiohttp-devtoolsandaiohttp-swagger
from Web_advanced docs.
-- by :user:CycloctaneRelated issues and pull requests on GitHub:
#11347.
Packaging updates and notes for downstreams
-
Started including the
llhttp:file:LICENSEfile in wheels by addingvendor/llhttp/LICENSEtolicense-filesin :file:setup.cfg-- by :user:threexc.Related issues and pull requests on GitHub:
#11226.
Contributor-facing changes
-
Updated a regex in
test_aiohttp_request_coroutinefor Python 3.14.Related issues and pull requests on GitHub:
#11271.
3.12.14
Bug fixes
-
Fixed file uploads failing with HTTP 422 errors when encountering 307/308 redirects, and 301/302 redirects for non-POST methods, by preserving the request body when appropriate per :rfc:
9110#section-15.4.3-3.1-- by :user:bdraco.Related issues and pull requests on GitHub:
#11270. -
Fixed :py:meth:
ClientSession.close() <aiohttp.ClientSession.close>hanging indefinitely when using HTTPS requests through HTTP proxies -- by :user:bdraco.Related issues and pull requests on GitHub:
#11273. -
Bumped minimum version of aiosignal to 1.4+ to resolve typing issues -- by :user:
Dreamsorcerer.Related issues and pull requests on GitHub:
#11280.
Features
-
Added initial trailer parsing logic to Python HTTP parser -- by :user:
Dreamsorcerer.Related issues and pull requests on GitHub:
#11269.
Improved documentation
-
Clarified exceptions raised by
WebSocketResponse.send_frameet al.
-- by :user:DoctorJohn.Related issues and pull requests on GitHub:
#11234.
3.12.13
3.12.12
Bug fixes
-
Fixed cookie unquoting to properly handle octal escape sequences in cookie values (e.g.,
\012for newline) by vendoring the correct_unquoteimplementation from Python'shttp.cookiesmodule -- by :user:bdraco.Related issues and pull requests on GitHub:
#11173. -
Fixed
Cookieheader parsing to treat attribute names as regular cookies per :rfc:6265#section-5.4-- by :user:bdraco.Related issues and pull requests on GitHub:
#11178.
3.12.11
Features
-
Improved SSL connection handling by changing the default
ssl_shutdown_timeout
from0.1to0seconds. SSL connections now use Python's default graceful
shutdown during normal operation but are aborted immediately when the connector
is closed, providing optimal behavior for both cases. Also added support for
ssl_shutdown_timeout=0on all Python versions. Previously, this value was
rejected on Python 3.11+ and ignored on earlier versions. Non-zero values on
Python < 3.11 now trigger aRuntimeWarning-- by :user:bdraco.The
ssl_shutdown_timeoutparameter is now deprecated and will be removed in
aiohttp 4.0 as there is no clear use case for changing the default.Related issues and pull requests on GitHub:
#11148.
Deprecations (removal in next major release)
-
Improved SSL connection handling by changing the default
ssl_shutdown_timeout
from0.1to0seconds. SSL connections now use Python's default graceful
shutdown during normal operation but are aborted immediately when the connector
is closed, providing optimal behavior for both cases. Also added support for
ssl_shutdown_timeout=0on all Python versions. Previously, this value was
rejected on Python 3.11+ and ignored on earlier versions. Non-zero values on
Python < 3.11 now trigger aRuntimeWarning-- by :user:bdraco.The
ssl_shutdown_timeoutparameter is now deprecated and will be removed in
aiohttp 4.0 as there is no clear use case for changing the default.Related issues and pull requests on GitHub:
#11148.
3.12.10
3.12.9
Bug fixes
-
Fixed
IOBasePayloadandTextIOPayloadreading entire files into memory when streaming large files -- by :user:bdraco.When using file-like objects with the aiohttp client, the entire file would be read into memory if the file size was provided in the
Content-Lengthheader. This could cause out-of-memory errors when uploading large files. The payload classes now correctly read data in chunks ofREAD_SIZE(64KB) regardless of the total content length.Related issues and pull requests on GitHub:
#11138.
3.12.8
Features
-
Added preemptive digest authentication to :class:
~aiohttp.DigestAuthMiddleware-- by :user:bdraco.The middleware now reuses authentication credentials for subsequent requests to the same
protection space, improving efficiency by avoiding extra authentication round trips.
This behavior matches how web browsers handle digest authentication and follows
:rfc:7616#section-3.6.Preemptive authentication is enabled by default but can be disabled by passing
preemptive=Falseto the middleware constructor.