3.12.0b0
Pre-releaseBug fixes
-
Response is now always True, instead of using MutableMapping behaviour (False when map is empty)
Related issues and pull requests on GitHub:
#10119. -
Fixed pytest plugin to not use deprecated :py:mod:
asynciopolicy APIs.Related issues and pull requests on GitHub:
#10851.
Features
-
Added a comprehensive HTTP Digest Authentication client middleware (DigestAuthMiddleware)
that implements RFC 7616. The middleware supports all standard hash algorithms
(MD5, SHA, SHA-256, SHA-512) with session variants, handles both 'auth' and
'auth-int' quality of protection options, and automatically manages the
authentication flow by intercepting 401 responses and retrying with proper
credentials -- by :user:feus4177, :user:TimMenninger, and :user:bdraco. -
Added client middleware support -- by :user:
bdracoand :user:Dreamsorcerer.This change allows users to add middleware to the client session and requests, enabling features like
authentication, logging, and request/response modification without modifying the core
request logic. Additionally, thesessionattribute was added toClientRequest,
allowing middleware to access the session for making additional requests. -
Allow user setting zlib compression backend -- by :user:
TimMenningerThis change allows the user to call :func:
aiohttp.set_zlib_backend()with the
zlib compression module of their choice. Default behavior continues to use
the builtinzliblibrary.Related issues and pull requests on GitHub:
#9798. -
Added support for overriding the base URL with an absolute one in client sessions
-- by :user:vivodi.Related issues and pull requests on GitHub:
#10074. -
Added
hostparameter toaiohttp_serverfixture -- by :user:christianwbrock.Related issues and pull requests on GitHub:
#10120. -
Detect blocking calls in coroutines using BlockBuster -- by :user:
cbornet.Related issues and pull requests on GitHub:
#10433. -
Added
socket_factoryto :py:class:aiohttp.TCPConnectorto allow specifying custom socket options
-- by :user:TimMenninger. -
Started building armv7l manylinux wheels -- by :user:
bdraco.Related issues and pull requests on GitHub:
#10797. -
Implemented shared DNS resolver management to fix excessive resolver object creation
when using multiple client sessions. The new_DNSResolverManagersingleton ensures
only oneDNSResolverobject is created for default configurations, significantly
reducing resource usage and improving performance for applications using multiple
client sessions simultaneously -- by :user:bdraco.Related issues and pull requests on GitHub:
#10847.
Packaging updates and notes for downstreams
-
Removed non SPDX-license description from
setup.cfg-- by :user:devanshu-ziphq.Related issues and pull requests on GitHub:
#10662. -
aiodnsis now installed on Windows with speedups extra -- by :user:bdraco.As of
aiodns3.3.0,SelectorEventLoopis no longer required when usingpycares4.7.0 or later.Related issues and pull requests on GitHub:
#10823. -
Fixed compatibility issue with Cython 3.1.1 -- by :user:
bdracoRelated issues and pull requests on GitHub:
#10877.
Contributor-facing changes
-
Sped up tests by disabling
blockbusterfixture fortest_static_file_hugeandtest_static_file_huge_canceltests -- by :user:dikos1337. -
Updated tests to avoid using deprecated :py:mod:
asynciopolicy APIs and
make it compatible with Python 3.14.Related issues and pull requests on GitHub:
#10851.
Miscellaneous internal changes
-
Added support for the
partitionedattribute in theset_cookiemethod.Related issues and pull requests on GitHub:
#9870. -
Setting :attr:
aiohttp.web.StreamResponse.last_modifiedto an unsupported type will now raise :exc:TypeErrorinstead of silently failing -- by :user:bdraco.Related issues and pull requests on GitHub:
#10146.