Version 0.29.0
Version 0.29.0 (26 November, 2026)
- Minimum supported Python version is now 3.10 (#3832)
- Expose FunctionAuth from the public API. (#3699)
Folge HTTPX, um die Release Notes in deinen Feed zu holen.
Behoben wurde ein SSL-Fehler bei der Kombination von verify=False mit clientseitigen Zertifikaten.
verify=False together with client side certificates.Version 0.28.0 depreziert verify als String und das cert-Argument, entfernt die Argumente proxies und app, nutzt kompakte JSON-Bodies, akzeptiert socks5h als Proxy-Schema und behebt das Verhalten von params={}.
The 0.28 release includes a limited set of deprecations.
Deprecations:
We are working towards a simplified SSL configuration API.
For users of the standard verify=True or verify=False cases, or verify=<ssl_context> case this should require no changes. The following cases have been deprecated...
verify argument as a string argument is now deprecated and will raise warnings.cert argument is now deprecated and will raise warnings.Our revised SSL documentation covers how to implement the same behaviour with a more constrained API.
The following changes are also included:
proxies argument has now been removed.app argument has now been removed.certifi and httpcore are only imported if required. (#3377)socks5h as a valid proxy scheme. (#3178)Request() method signature in line with client.request() and httpx.request(). (#3378)params={}, always strictly update rather than merge with an existing querystring. (#3364)Die zuvor entfernte, eigentlich private Kurzform URLTypes wurde wieder eingeführt.
URLTypes shortcut. (#2673)Neu ist die Unterstützung für zstd-Content-Decoding über httpx[zstd], außerdem wurden die Fehlermeldungen bei InvalidURL und die Typsignatur von app in ASGITransport verbessert.
zstd content decoding using the python zstandard package is added. Installable using httpx[zstd]. (#3139)InvalidURL exceptions. (#3250)app type signature in ASGITransport. (#3109)Die app=...-Kurzform ist veraltet (stattdessen WSGITransport oder ASGITransport nutzen), zudem wird das http1-Argument bei Proxy-Transports beachtet und der RFC-2069-Digest-Modus korrigiert.
app=... shortcut has been deprecated. Use the explicit style of transport=httpx.WSGITransport() or transport=httpx.ASGITransport() instead.http1 argument while configuring proxy transports. (#3023)Das neue Argument proxy ersetzt das nun veraltete proxies (für komplexere Konfigurationen dient mounts=), außerdem wurden mehrere Fehler bei URL-Escaping, NO_PROXY, ASGI raw_path und Response.iter_text() behoben.
proxy argument was added. You should use the proxy argument instead of the deprecated proxies, or use mounts= for more complex configurations. (#2879)proxies argument is now deprecated. It will still continue to work, but it will be removed in the future. (#2879)NO_PROXY envvar cases when a fully qualified URL is supplied as the value. (#2741)raw_path does not include URL query component. (#2999)Response.iter_text() cannot yield empty strings. (#2998)In einigen __init__()-Methoden wurden fehlende Type Hints hinzugefügt.
__init__() methods. (#2938)HTTPX unterstützt nun Python 3.12 und httpcore 1.0, und das Setzen von Response.encoding nach dem Zugriff auf Response.text löst jetzt einen ValueError aus.
ValueError on Response.encoding being set after Response.text has been accessed. (#2852)HTTPX unterstützt HTTPS-Proxys, bietet das Argument socket_options für die Transport-Klassen und lässt Response.raise_for_status() die Response zurückgeben, während Python 3.7 nicht mehr unterstützt wird und mehrere Fehler behoben wurden.
Extensions from Mapping[Str, Any] to MutableMapping[Str, Any]. (#2803)socket_options argument to httpx.HTTPTransport and httpx.AsyncHTTPTransport classes. (#2716)Response.raise_for_status() method now returns the response instance. For example: data = httpx.get('...').raise_for_status().json(). (#2776)500 error response instead of exceptions when raise_app_exceptions=False is set on ASGITransport. (#2669)WSGITransport environs have a SERVER_PROTOCOL. (#2708)%2F in query parameters (#2723)httpstatuses.com for HTTP error reference (#2768)Einige InvalidURL-Exceptions liefern mehr Kontext, und es wurden mehrere Fehler behoben, darunter Percent-Encoding, IP-Adressen in NO_PROXY, NetRCAuth()-Standarddatei und Logging asynchroner Requests.
InvalidURL exceptions. (#2675)NO_PROXY environment variable. (#2659)NetRCAuth() to None to use the stdlib default. (#2667)Das Logging folgt nun dem Python-Standard ohne TRACE-Level und HTTPX_LOG_LEVEL, Response.iter_lines() enthält keine Zeilenumbrüche mehr, Query-Parameter nutzen %20 statt +, NetRC erfordert die explizite Klasse httpx.NetRCAuth(), und die Abhängigkeit rfc3986 wurde entfernt.
TRACE log level, and we no longer use the HTTPX_LOG_LEVEL environment variable to auto-configure logging. We now have a significant amount of DEBUG logging available at the network level. Full documentation is available at https://www.python-httpx.org/logging/ (#2547, encode/httpcore#648)Response.iter_lines() method now matches the stdlib behaviour and does not include the newline characters. It also resolves a performance issue. (#2423)requests, but is in line with browser behavior in Chrome, Safari, and Firefox. Both options are RFC valid. (#2543)httpx.NetRCAuth() authentication class. See the documentation at https://www.python-httpx.org/advanced/#netrc-support (#2525)rfc3986 dependancy has been removed. (#2252)Die versehentlich in 0.23.2 eingeführte strengere Typprüfung bei Query-Parametern wurde wieder rückgängig gemacht.
HTTPX unterstützt Nonce-Counting bei Digest-Auth, nutzt bei Multipart-Uploads mit unbekannter Dateilänge chunked Transfer Encoding, wirft einen TypeError bei dict-Inhalten und stellt url.raw als einfaches Named-Tuple wieder bereit.
Content-Length. (#2382)TypeError if content is passed a dict-instance. (#2495)RawURL. We continue to expose a url.raw property which is now a plain named-tuple. This API is still expected to be deprecated, but we will do so with a major version bump. (#2481)HTTPX unterstützt Python 3.11 und Connection Upgrades, erlaubt einen expliziten Multipart-Boundary sowie tuple, list und str bei Multipart-Werten, behält leere Query-Parameter bei und entfernt RawURL sowie .read/.aread von SyncByteStream/AsyncByteStream.
Content-Type header. (#2278)tuple or list for multipart values, not just list. (#2355)str content for multipart upload files. (#2400).read/.aread from SyncByteStream/AsyncByteStream (#2407)RawURL. (#2241)HTTPX nutzt utf-8 als Standardzeichensatz statt automatischer Erkennung, unterstützt Python 3.6 nicht mehr und behebt zahlreiche Fehler, unter anderem bei Digest-Auth, Multipart-Uploads, Redirects und im Kommandozeilen-Client.
utf-8 as the default character set, instead of falling back to charset-normalizer for auto-detection. To enable automatic character set detection, see the documentation. (#2165)URL.copy_with for some oddly formed URL cases. (#2185)iter_bytes never yields zero-length chunks. (#2068)Authorization header for redirects that are to the same origin, but are an http-to-https upgrade. (#2074)<16086 bytes of binary data> instead. (#2076)--proxies argument in the command line client help. (#2125).request on HTTPError exceptions. (#2158)HTTPX unterstützt das SOCKS5-Proxy-Protokoll über das Paket socksio sowie eigene Header in multipart/form-data-Requests, außerdem wurden __del__-Warnungen bei nicht geschlossenen Clients und Headers.update(...) korrigiert.
socksio package. (#2034)__del__ with unclosed clients. (#2026)Headers.update(...) to correctly handle repeated headers (#2038)Streaming-Uploads mit SyncByteStream oder AsyncByteStream funktionieren wieder, eine Regression aus 0.21.2 wurde behoben.
SyncByteStream or AsyncByteStream. Regression in 0.21.2. (#2016)HTTP/2 funktioniert nun bei getunnelten Proxys, und große Datei-Uploads sind schneller.
Die Eigenschaft response.url ist jetzt korrekt als URL statt als Optional[URL] annotiert.
response.url property is now correctly annotated as URL, instead of Optional[URL]. (#1940)