head 1.34; access; symbols pkgsrc-2023Q4:1.32.0.2 pkgsrc-2023Q4-base:1.32 pkgsrc-2023Q3:1.29.0.2 pkgsrc-2023Q3-base:1.29 pkgsrc-2023Q2:1.28.0.2 pkgsrc-2023Q2-base:1.28 pkgsrc-2023Q1:1.26.0.2 pkgsrc-2023Q1-base:1.26 pkgsrc-2022Q4:1.25.0.2 pkgsrc-2022Q4-base:1.25 pkgsrc-2022Q3:1.24.0.4 pkgsrc-2022Q3-base:1.24 pkgsrc-2022Q2:1.24.0.2 pkgsrc-2022Q2-base:1.24 pkgsrc-2022Q1:1.23.0.2 pkgsrc-2022Q1-base:1.23 pkgsrc-2021Q4:1.17.0.2 pkgsrc-2021Q4-base:1.17 pkgsrc-2021Q3:1.14.0.2 pkgsrc-2021Q3-base:1.14 pkgsrc-2021Q2:1.12.0.2 pkgsrc-2021Q2-base:1.12 pkgsrc-2021Q1:1.11.0.2 pkgsrc-2021Q1-base:1.11 pkgsrc-2020Q4:1.9.0.2 pkgsrc-2020Q4-base:1.9 pkgsrc-2020Q3:1.6.0.4 pkgsrc-2020Q3-base:1.6 pkgsrc-2020Q2:1.6.0.2 pkgsrc-2020Q2-base:1.6 pkgsrc-2020Q1:1.5.0.2 pkgsrc-2020Q1-base:1.5; locks; strict; comment @# @; 1.34 date 2024.02.21.19.19.34; author adam; state Exp; branches; next 1.33; commitid bEVb9bp418U5OkZE; 1.33 date 2024.01.01.11.45.44; author adam; state Exp; branches; next 1.32; commitid Hn2dUOyMNa23WJSE; 1.32 date 2023.11.27.20.18.46; author adam; state Exp; branches; next 1.31; commitid L0g9LpKDennPThOE; 1.31 date 2023.11.06.17.40.17; author adam; state Exp; branches; next 1.30; commitid AEK5HGKqdStiHzLE; 1.30 date 2023.10.28.19.57.23; author wiz; state Exp; branches; next 1.29; commitid jP8MYROLWZ3yJqKE; 1.29 date 2023.09.13.07.25.55; author adam; state Exp; branches; next 1.28; commitid MLV6x6psKGV82AEE; 1.28 date 2023.05.19.08.19.51; author adam; state Exp; branches; next 1.27; commitid JKQzl4FQthwM5ypE; 1.27 date 2023.04.17.09.58.49; author adam; state Exp; branches; next 1.26; commitid S596Dl6RdYXuFrlE; 1.26 date 2023.01.04.10.37.03; author adam; state Exp; branches; next 1.25; commitid JFTFj1WkMTrNbd8E; 1.25 date 2022.11.18.18.53.47; author adam; state Exp; branches; next 1.24; commitid v4bgVpFDYDwSrd2E; 1.24 date 2022.05.24.12.31.21; author adam; state Exp; branches; next 1.23; commitid aQCkpptq38eu3jFD; 1.23 date 2022.01.27.08.37.57; author adam; state Exp; branches; next 1.22; commitid GaSeVM720kxwwfqD; 1.22 date 2022.01.07.16.25.10; author adam; state Exp; branches; next 1.21; commitid gDBSyQU1fiaMKInD; 1.21 date 2022.01.06.08.54.52; author adam; state Exp; branches; next 1.20; commitid BPqNyFkkto1fiynD; 1.20 date 2022.01.05.15.41.30; author wiz; state Exp; branches; next 1.19; commitid FQ77UruBIUsgzsnD; 1.19 date 2022.01.04.20.55.30; author wiz; state Exp; branches; next 1.18; commitid CYyhdK9qtoffkmnD; 1.18 date 2021.12.30.13.05.41; author adam; state Exp; branches; next 1.17; commitid w23rFuQ4pTWhUFmD; 1.17 date 2021.11.17.08.35.57; author adam; state Exp; branches; next 1.16; commitid ixlOxBV5FCTrN7hD; 1.16 date 2021.11.15.17.41.51; author adam; state Exp; branches; next 1.15; commitid 4R8cY9lZrDWISUgD; 1.15 date 2021.10.21.13.16.15; author adam; state Exp; branches; next 1.14; commitid xfjID3L2z9FkdGdD; 1.14 date 2021.08.25.19.20.56; author adam; state Exp; branches; next 1.13; commitid ufngotdfYfI24o6D; 1.13 date 2021.07.08.08.39.00; author adam; state Exp; branches; next 1.12; commitid ZsVabdOrbott3a0D; 1.12 date 2021.05.08.08.58.42; author adam; state Exp; branches; next 1.11; commitid rSKFXbh6tIjy7kSC; 1.11 date 2021.03.16.08.09.24; author adam; state Exp; branches; next 1.10; commitid 1sizedevjusAyvLC; 1.10 date 2021.02.28.18.40.55; author adam; state Exp; branches; next 1.9; commitid qYxW2tKtlZSZyvJC; 1.9 date 2020.10.13.11.14.43; author adam; state Exp; branches; next 1.8; commitid oKqDRkX43JzTwJrC; 1.8 date 2020.10.02.07.42.53; author adam; state Exp; branches; next 1.7; commitid FxBBbeY1dGljIiqC; 1.7 date 2020.10.01.06.51.31; author adam; state Exp; branches; next 1.6; commitid pcbQDtqQsqf2saqC; 1.6 date 2020.06.03.14.21.26; author adam; state Exp; branches; next 1.5; commitid 8oKhkiS6tyaQNMaC; 1.5 date 2020.03.20.07.43.06; author adam; state Exp; branches; next 1.4; commitid bGPKrWM5OeCZ071C; 1.4 date 2020.03.10.07.36.16; author adam; state Exp; branches; next 1.3; commitid 5nyM1lRMa2xpiPZB; 1.3 date 2020.01.20.11.50.48; author adam; state Exp; branches; next 1.2; commitid 0r1RlkrojWzvjqTB; 1.2 date 2020.01.14.16.10.53; author adam; state Exp; branches; next 1.1; commitid DjTjdq97kZoEWFSB; 1.1 date 2020.01.08.20.54.27; author adam; state Exp; branches; next ; commitid JkPK5quPBX4XHVRB; desc @@ 1.34 log @py-httpx: updated to 0.27.0 0.27.0 (21st February, 2024) Deprecated * The `app=...` shortcut has been deprecated. Use the explicit style of `transport=httpx.WSGITransport()` or `transport=httpx.ASGITransport()` instead. Fixed * Respect the `http1` argument while configuring proxy transports. * Fix RFC 2069 mode digest authentication. @ text @# $NetBSD: Makefile,v 1.33 2024/01/01 11:45:44 adam Exp $ DISTNAME= httpx-0.27.0 PKGNAME= ${PYPKGPREFIX}-${DISTNAME} CATEGORIES= www python MASTER_SITES= ${MASTER_SITE_PYPI:=h/httpx/} MAINTAINER= pkgsrc-users@@NetBSD.org HOMEPAGE= https://github.com/encode/httpx COMMENT= The next generation HTTP client LICENSE= modified-bsd TOOL_DEPENDS+= ${PYPKGPREFIX}-hatchling-[0-9]*:../../devel/py-hatchling TOOL_DEPENDS+= ${PYPKGPREFIX}-hatch-fancy-pypi-readme-[0-9]*:../../devel/py-hatch-fancy-pypi-readme DEPENDS+= ${PYPKGPREFIX}-anyio-[0-9]*:../../devel/py-anyio DEPENDS+= ${PYPKGPREFIX}-certifi-[0-9]*:../../security/py-certifi DEPENDS+= ${PYPKGPREFIX}-httpcore>=1.0.0:../../www/py-httpcore DEPENDS+= ${PYPKGPREFIX}-idna-[0-9]*:../../www/py-idna DEPENDS+= ${PYPKGPREFIX}-sniffio-[0-9]*:../../misc/py-sniffio TEST_DEPENDS+= ${PYPKGPREFIX}-trustme-[0-9]*:../../security/py-trustme TEST_DEPENDS+= ${PYPKGPREFIX}-uvicorn-[0-9]*:../../www/py-uvicorn USE_LANGUAGES= # none PYTHON_VERSIONS_INCOMPATIBLE= 27 post-install: cd ${DESTDIR}${PREFIX}/bin && \ ${MV} httpx httpx-${PYVERSSUFFIX} || ${TRUE} .include "../../lang/python/wheel.mk" .include "../../mk/bsd.pkg.mk" @ 1.33 log @py-httpx: updated to 0.26.0 0.26.0 (20th December, 2023) Added * The `proxy` argument was added. You should use the `proxy` argument instead of the deprecated `proxies`, or use `mounts=` for more complex configurations. Deprecated * The `proxies` argument is now deprecated. It will still continue to work, but it will be removed in the future. Fixed * Fix cases of double escaping of URL path components. Allow / as a safe character in the query portion. * Handle `NO_PROXY` envvar cases when a fully qualified URL is supplied as the value. * Allow URLs where username or password contains unescaped '@@'. * Ensure ASGI `raw_path` does not include URL query component. * Ensure `Response.iter_text()` cannot yield empty strings. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.32 2023/11/27 20:18:46 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.26.0 d20 2 @ 1.32 log @py-httpx: updated to 0.25.2 0.25.2 (24th November, 2023) Added * Add missing type hints to few `__init__()` methods. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.31 2023/11/06 17:40:17 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.25.2 d15 1 d17 1 a17 1 DEPENDS+= ${PYPKGPREFIX}-httpcore>=0.18.0:../../www/py-httpcore @ 1.31 log @py-httpx: updated to 0.25.1 0.25.1 (3rd November, 2023) * Add support for Python 3.12. * Add support for httpcore 1.0 @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.30 2023/10/28 19:57:23 wiz Exp $ d3 1 a3 1 DISTNAME= httpx-0.25.1 @ 1.30 log @python/wheel.mk: simplify a lot, and switch to 'installer' for installation This follows the recommended bootstrap method (flit_core, build, installer). However, installer installs different files than pip, so update PLISTs for all packages using wheel.mk and bump their PKGREVISIONs. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.29 2023/09/13 07:25:55 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.25.0 a4 1 PKGREVISION= 1 @ 1.29 log @py-httpx: updated to 0.25.0 0.25.0 (11th Sep, 2023) Removed * Drop support for Python 3.7. Added * Support HTTPS proxies. * Change the type of `Extensions` from `Mapping[Str, Any]` to `MutableMapping[Str, Any]`. * Add `socket_options` argument to `httpx.HTTPTransport` and `httpx.AsyncHTTPTransport` classes. * The `Response.raise_for_status()` method now returns the response instance. For example: `data = httpx.get('...').raise_for_status().json()`. Fixed * Return `500` error response instead of exceptions when `raise_app_exceptions=False` is set on `ASGITransport`. * Ensure all `WSGITransport` environs have a `SERVER_PROTOCOL`. * Always encode forward slashes as `%2F` in query parameters * Use Mozilla documentation instead of `httpstatuses.com` for HTTP error reference @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.28 2023/05/19 08:19:51 adam Exp $ d5 1 @ 1.28 log @py-httpx: updated to 0.24.1 0.24.1 (17th May, 2023) Added * Provide additional context in some `InvalidURL` exceptions. Fixed * Fix optional percent-encoding behaviour. * More robust checking for opening upload files in binary mode. * Properly support IP addresses in `NO_PROXY` environment variable. * Set default file for `NetRCAuth()` to `None` to use the stdlib default. * Set logging request lines to INFO level for async requests, in line with sync requests. * Fix which gen-delims need to be escaped for path/query/fragment components in URL. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.27 2023/04/17 09:58:49 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.24.1 d16 1 a16 1 DEPENDS+= ${PYPKGPREFIX}-httpcore>=0.15.0:../../www/py-httpcore @ 1.27 log @py-httpx: updated to 0.24.0 0.24.0 (6th April, 2023) Changed * The logging behaviour has been changed to be more in-line with other standard Python logging usages. We no longer have a custom `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/ * The `Response.iter_lines()` method now matches the stdlib behaviour and does not include the newline characters. It also resolves a performance issue. * Query parameter encoding switches from using + for spaces and %2F for forward slash, to instead using %20 for spaces and treating forward slash as a safe, unescaped character. This differs from `requests`, but is in line with browser behavior in Chrome, Safari, and Firefox. Both options are RFC valid. * NetRC authentication is no longer automatically handled, but is instead supported by an explicit `httpx.NetRCAuth()` authentication class. See the documentation at https://www.python-httpx.org/advanced/#netrc-support Removed * The `rfc3986` dependancy has been removed. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.26 2023/01/04 10:37:03 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.24.0 @ 1.26 log @py-httpx: updated to 0.23.3 0.23.3 (4th Jan, 2023) Fixed Version 0.23.2 accidentally included stricter type checking on query parameters. This shouldn've have been included in a minor version bump, and is now reverted. 0.23.2 (2nd Jan, 2023) Added Support digest auth nonce counting to avoid multiple auth requests. Fixed Multipart file uploads where the file length cannot be determine now use chunked transfer encoding, rather than loading the entire file into memory in order to determine the Content-Length. Raise TypeError if content is passed a dict-instance. Partially revert the API breaking change in 0.23.1, which removed 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. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.25 2022/11/18 18:53:47 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.23.3 a15 1 DEPENDS+= ${PYPKGPREFIX}-charset-normalizer-[0-9]*:../../converters/py-charset-normalizer d17 1 a17 1 DEPENDS+= ${PYPKGPREFIX}-rfc3986>=1.3:../../www/py-rfc3986 @ 1.25 log @py-httpx: updated to 0.23.1 0.23.1 Added * Support for Python 3.11. * Allow setting an explicit multipart boundary in `Content-Type` header. * Allow `tuple` or `list` for multipart values, not just `list`. * Allow `str` content for multipart upload files. * Support connection upgrades. See https://www.encode.io/httpcore/extensions/#upgrade-requests Fixed * Don't drop empty query parameters. Removed * Drop `.read`/`.aread` from `SyncByteStream`/`AsyncByteStream`. * Drop `RawURL`. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.24 2022/05/24 12:31:21 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.23.1 @ 1.24 log @py-httpx: updated to 0.23.0 0.23.0 (23rd May, 2022) Changed * Drop support for Python 3.6. * Use `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](https://www.python-httpx.org/advanced/#character-set-encodings-and-auto-detection). Fixed * Fix `URL.copy_with` for some oddly formed URL cases. * Digest authentication should use case-insensitive comparison for determining which algorithm is being used. * Fix console markup escaping in command line client. * When files are used in multipart upload, ensure we always seek to the start of the file. * Ensure that `iter_bytes` never yields zero-length chunks. * Preserve `Authorization` header for redirects that are to the same origin, but are an `http`-to-`https` upgrade. * When responses have binary output, don't print the output to the console in the command line client. Use output like `<16086 bytes of binary data>` instead. * Fix display of `--proxies` argument in the command line client help. * Close responses when task cancellations occur during stream reading. * Fix type error on accessing `.request` on `HTTPError` exceptions. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.23 2022/01/27 08:37:57 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.23.0 d13 2 a24 2 USE_PKG_RESOURCES= yes d29 1 a29 1 .include "../../lang/python/egg.mk" @ 1.23 log @py-httpx: updated to 0.22.0 0.22.0 Added * Support for [the SOCKS5 proxy protocol](https://www.python-httpx.org/advanced/#socks) via [the `socksio` package](https://github.com/sethmlarson/socksio). * Support for custom headers in multipart/form-data requests Fixed * Don't perform unreliable close/warning on `__del__` with unclosed clients. * Fix `Headers.update(...)` to correctly handle repeated headers @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.22 2022/01/07 16:25:10 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.22.0 d15 1 a15 1 DEPENDS+= ${PYPKGPREFIX}-httpcore>=0.14.5:../../www/py-httpcore @ 1.22 log @py-httpx: updated to 0.21.3 0.21.3 Fixed * Fix streaming uploads using `SyncByteStream` or `AsyncByteStream`. Regression in 0.12.2. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.21 2022/01/06 08:54:52 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.21.3 d15 1 a15 1 DEPENDS+= ${PYPKGPREFIX}-httpcore>=0.14.0:../../www/py-httpcore d21 1 a21 1 PYTHON_VERSIONS_INCOMPATIBLE= 27 # py-httpcore, py-anyio, py-uvloop @ 1.21 log @py-httpx: updated to 0.21.2 0.21.2 Fixed * HTTP/2 support for tunnelled proxy cases. * Improved the speed of large file uploads. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.20 2022/01/05 15:41:30 wiz Exp $ d3 1 a3 1 DISTNAME= httpx-0.21.2 @ 1.20 log @python: egg.mk: add USE_PKG_RESOURCES flag This flag should be set for packages that import pkg_resources and thus need setuptools after the build step. Set this flag for packages that need it and bump PKGREVISION. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.19 2022/01/04 20:55:30 wiz Exp $ d3 1 a3 1 DISTNAME= httpx-0.21.1 a4 1 PKGREVISION= 2 @ 1.19 log @*: bump PKGREVISION for egg.mk users They now have a tool dependency on py-setuptools instead of a DEPENDS @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.18 2021/12/30 13:05:41 adam Exp $ d5 1 a5 1 PKGREVISION= 1 d24 2 @ 1.18 log @Forget about Python 3.6 @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.17 2021/11/17 08:35:57 adam Exp $ d5 1 @ 1.17 log @py-httpx: updated to 0.21.1 0.21.1 Fixed * The `response.url` property is now correctly annotated as `URL`, instead of `Optional[URL]`. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.16 2021/11/15 17:41:51 adam Exp $ d21 1 a21 1 PYTHON_VERSIONS_INCOMPATIBLE= 27 36 # py-httpcore, py-anyio, py-uvloop @ 1.16 log @py-httpx: updated to 0.21.0 0.21.0 (15th November, 2021) The 0.21.0 release integrates against a newly redesigned httpcore backend. Both packages ought to automatically update to the required versions, but if you are seeing any issues, you should ensure that you have httpx==0.21.* and httpcore==0.14.* installed. Added The command-line client will now display connection information when -v/--verbose is used. The command-line client will now display server certificate information when -v/--verbose is used. The command-line client is now able to properly detect if the outgoing request should be formatted as HTTP/1.1 or HTTP/2, based on the result of the HTTP/2 negotiation. Removed Curio support is no longer currently included. Please get in touch if you require this, so that we can assess priorities. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.15 2021/10/21 13:16:15 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.21.0 @ 1.15 log @py-httpx: updated to 0.20.0 0.20.0: Changed * The `allow_redirects` flag is now `follow_redirects` and defaults to `False`. * The `raise_for_status()` method will now raise an exception for any responses except those with 2xx status codes. Previously only 4xx and 5xx status codes would result in an exception. * The low-level transport API changes to the much simpler `response = transport.handle_request(request)`. * The `client.send()` method no longer accepts a `timeout=...` argument, but the `client.build_request()` does. This required by the signature change of the Transport API. The request timeout configuration is now stored on the request instance, as `request.extensions['timeout']`. Added * Added the `httpx` command-line client. * Response instances now include `.is_informational`, `.is_success`, `.is_redirect`, `.is_client_error`, and `.is_server_error` properties for checking 1xx, 2xx, 3xx, 4xx, and 5xx response types. Note that the behaviour of `.is_redirect` is slightly different in that it now returns True for all 3xx responses, in order to allow for a consistent set of properties onto the different HTTP status code types. The `response.has_redirect_location` location may be used to determine responses with properly formed URL redirects. Fixed * `response.iter_bytes()` no longer raises a ValueError when called on a response with no content. * The `'wsgi.error'` configuration now defaults to `sys.stderr`, and is corrected to be a `TextIO` interface, not a `BytesIO` interface. Additionally, the WSGITransport now accepts a `wsgi_error` confguration. * Follow the WSGI spec by properly closing the iterable returned by the application. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.14 2021/08/25 19:20:56 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.20.0 d15 1 a15 1 DEPENDS+= ${PYPKGPREFIX}-httpcore>=0.13.3:../../www/py-httpcore @ 1.14 log @py-httpx: updated to 0.19.0 0.19.0 Added Add support for Client(allow_redirects=). Add automatic character set detection, when no charset is included in the response Content-Type header. Changed Event hooks are now also called for any additional redirect or auth requests/responses. Strictly enforce that upload files must be opened in binary mode. Strictly enforce that client instances can only be opened and closed once, and cannot be re-opened. Drop mode argument from httpx.Proxy(..., mode=...). @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.13 2021/07/08 08:39:00 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.19.0 d14 1 d23 4 @ 1.13 log @py-httpx: updated to 0.18.2 0.18.2 Added * Support for Python 3.10. * Expose `httpx.USE_CLIENT_DEFAULT`, used as the default to `auth` and `timeout` parameters in request methods. * Support [HTTP/2 "prior knowledge"](https://python-hyper.org/projects/hyper-h2/en/v2.3.1/negotiating-http2.html#prior-knowledge), using `httpx.Client(http1=False, http2=True)`. Fixed * Clean up some cases where warnings were being issued. * Prefer Content-Length over Transfer-Encoding: chunked for content= cases. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.12 2021/05/08 08:58:42 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.18.2 @ 1.12 log @py-httpx: updated to 0.18.1 0.18.1 (29th April, 2021) Changed * Update brotli support to use the `brotlicffi` package * Ensure that `Request(..., stream=...)` does not auto-generate any headers on the request instance. Fixed * Pass through `timeout=...` in top-level httpx.stream() function. * Map httpcore transport close exceptions to httpx exceptions. 0.18.0 (27th April, 2021) The 0.18.x release series formalises our low-level Transport API, introducing the base classes `httpx.BaseTransport` and `httpx.AsyncBaseTransport`. See the "[Writing custom transports](https://www.python-httpx.org/advanced/#writing-custom-transports)" documentation and the [`httpx.BaseTransport.handle_request()`](https://github.com/encode/httpx/blob/397aad98fdc8b7580a5fc3e88f1578b4302c6382/httpx/_transports/base.py#L77-L147) docstring for more complete details on implementing custom transports. Pull request 1522 includes a checklist of differences from the previous `httpcore` transport API, for developers implementing custom transports. The following API changes have been issuing deprecation warnings since 0.17.0 onwards, and are now fully deprecated... * You should now use httpx.codes consistently instead of httpx.StatusCodes. * Use limits=... instead of pool_limits=.... * Use proxies={"http://": ...} instead of proxies={"http": ...} for scheme-specific mounting. Changed * Transport instances now inherit from `httpx.BaseTransport` or `httpx.AsyncBaseTransport`, and should implement either the `handle_request` method or `handle_async_request` method. * The `response.ext` property and `Response(ext=...)` argument are now named `extensions`. * The recommendation to not use `data=` in favour of `content=` has now been escalated to a deprecation warning. * Drop `Response(on_close=...)` from API, since it was a bit of leaking implementation detail. * When using a client instance, cookies should always be set on the client, rather than on a per-request basis. We prefer enforcing a stricter API here because it provides clearer expectations around cookie persistence, particularly when redirects occur. * The runtime exception `httpx.ResponseClosed` is now named `httpx.StreamClosed`. * The `httpx.QueryParams` model now presents an immutable interface. There is a discussion on [the design and motivation here](https://github.com/encode/httpx/discussions/1599). Use `client.params = client.params.merge(...)` instead of `client.params.update(...)`. The basic query manipulation methods are `query.set(...)`, `query.add(...)`, and `query.remove()`. Added * The `Request` and `Response` classes can now be serialized using pickle. * Handle `data={"key": [None|int|float|bool]}` cases. * Support `httpx.URL(**kwargs)`, for example `httpx.URL(scheme="https", host="www.example.com", path="/')`, or `httpx.URL("https://www.example.com/", username="tom@@gmail.com", password="123 456")`. * Support `url.copy_with(params=...)`. * Add `url.params` parameter, returning an immutable `QueryParams` instance. * Support query manipulation methods on the URL class. These are `url.copy_set_param()`, `url.copy_add_param()`, `url.copy_remove_param()`, `url.copy_merge_params()`. * The `httpx.URL` class now performs port normalization, so `:80` ports are stripped from `http` URLs and `:443` ports are stripped from `https` URLs. * The `URL.host` property returns unicode strings for internationalized domain names. The `URL.raw_host` property returns byte strings with IDNA escaping applied. Fixed * Fix Content-Length for cases of `files=...` where unicode string is used as the file content. * Fix some cases of merging relative URLs against `Client(base_url=...)`. * The `request.content` attribute is now always available except for streaming content, which requires an explicit `.read()`. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.11 2021/03/16 08:09:24 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.18.1 d14 1 a14 1 DEPENDS+= ${PYPKGPREFIX}-httpcore>=0.12.0:../../www/py-httpcore d20 1 a20 1 PYTHON_VERSIONS_INCOMPATIBLE= 27 @ 1.11 log @py-httpx: updated to 0.17.1 0.17.1 Fixed * Type annotation on `CertTypes` allows `keyfile` and `password` to be optional. * Fix httpcore pinned version. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.10 2021/02/28 18:40:55 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.17.1 @ 1.10 log @py-httpx: updated to 0.17.0 0.17.0 Added Add httpx.MockTransport(), allowing to mock out a transport using pre-determined responses. Add httpx.HTTPTransport() and httpx.AsyncHTTPTransport() default transports. Add mount API support, using httpx.Client(mounts=...). Add chunk_size parameter to iter_raw(), iter_bytes(), iter_text(). Add keepalive_expiry parameter to httpx.Limits() configuration. Add repr to httpx.Cookies to display available cookies. Add support for params= (previously only params= was supported). Fixed Add missing raw_path to ASGI scope. Tweak create_ssl_context defaults to use trust_env=True. Properly URL-escape WSGI PATH_INFO. Properly set default ports in WSGI transport. Properly encode slashes when using base_url. Properly map exceptions in request.aclose(). @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.9 2020/10/13 11:14:43 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.17.0 @ 1.9 log @py-httpx: updated to 0.16.1 0.16.1 Fixed * Support literal IPv6 addresses in URLs. * Force lowercase headers in ASGI scope dictionaries. 0.16.0 Changed * Preserve HTTP header casing. * Drop `response.next()` and `response.anext()` methods in favour of `response.next_request` attribute. * Closed clients now raise a runtime error if attempting to send a request. Added * Add Python 3.9 to officially supported versions. * Type annotate `__enter__`/`__exit__`/`__aenter__`/`__aexit__` in a way that supports subclasses of `Client` and `AsyncClient`. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.8 2020/10/02 07:42:53 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.16.1 @ 1.8 log @py-httpx: updated to 0.15.5 0.15.5 Added * Add `response.next_request` @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.7 2020/10/01 06:51:31 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.15.5 d14 1 a14 1 DEPENDS+= ${PYPKGPREFIX}-httpcore>=0.11.0:../../www/py-httpcore @ 1.7 log @py-httpx: updated to 0.15.4 0.15.4 Added * Support direct comparisons between `Headers` and dicts or lists of two-tuples. Eg. `assert response.headers == {"Content-Length": 24}` Fixed * Fix automatic `.read()` when `Response` instances are created with `content=` 0.15.3 Fixed * Fixed connection leak in async client due to improper closing of response streams. 0.15.2 Fixed * Fixed `response.elapsed` property. * Fixed client authentication interaction with `.stream()`. 0.15.1 Fixed * ASGITransport now properly applies URL decoding to the `path` component, as-per the ASGI spec. 0.15.0 Added * Added support for curio. (Pull https://github.com/encode/httpcore/pull/168) * Added support for event hooks. * Added support for authentication flows which require either sync or async I/O. * Added support for monitoring download progress with `response.num_bytes_downloaded`. * Added `Request(content=...)` for byte content, instead of overloading `Request(data=...)` * Added support for all URL components as parameter names when using `url.copy_with(...)`. * Neater split between automatically populated headers on `Request` instances, vs default `client.headers`. * Unclosed `AsyncClient` instances will now raise warnings if garbage collected. * Support `Response(content=..., text=..., html=..., json=...)` for creating usable response instances in code. * Support instantiating requests from the low-level transport API. * Raise errors on invalid URL types. Changed * Cleaned up expected behaviour for URL escaping. `url.path` is now URL escaped. * Cleaned up expected behaviour for bytes vs str in URL components. `url.userinfo` and `url.query` are not URL escaped, and so return bytes. * Drop `url.authority` property in favour of `url.netloc`, since "authority" was semantically incorrect. * Drop `url.full_path` property in favour of `url.raw_path`, for better consistency with other parts of the API. * No longer use the `chardet` library for auto-detecting charsets, instead defaulting to a simpler approach when no charset is specified. Fixed * Swapped ordering of redirects and authentication flow. * `.netrc` lookups should use host, not host+port. Removed * The `URLLib3Transport` class no longer exists. We've published it instead as an example of [a custom transport class](https://gist.github.com/florimondmanca/d56764d78d748eb9f73165da388e546e). * Drop `request.timer` attribute, which was being used internally to set `response.elapsed`. * Drop `response.decoder` attribute, which was being used internally. * `Request.prepare()` is now a private method. * The `Headers.getlist()` method had previously been deprecated in favour of `Headers.get_list()`. It is now fully removed. * The `QueryParams.getlist()` method had previously been deprecated in favour of `QueryParams.get_list()`. It is now fully removed. * The `URL.is_ssl` property had previously been deprecated in favour of `URL.scheme == "https"`. It is now fully removed. * The `httpx.PoolLimits` class had previously been deprecated in favour of `httpx.Limits`. It is now fully removed. * The `max_keepalive` setting had previously been deprecated in favour of the more explicit `max_keepalive_connections`. It is now fully removed. * The verbose `httpx.Timeout(5.0, connect_timeout=60.0)` style had previously been deprecated in favour of `httpx.Timeout(5.0, connect=60.0)`. It is now fully removed. * Support for instantiating a timeout config missing some defaults, such as `httpx.Timeout(connect=60.0)`, had previously been deprecated in favour of enforcing a more explicit style, such as `httpx.Timeout(5.0, connect=60.0)`. This is now strictly enforced. 0.14.3 Added * `http.Response()` may now be instantiated without a `request=...` parameter. Useful for some unit testing cases. * Add `103 Early Hints` and `425 Too Early` status codes. Fixed * `DigestAuth` now handles responses that include multiple 'WWW-Authenticate' headers. * Call into transport `__enter__`/`__exit__` or `__aenter__`/`__aexit__` when client is used in a context manager style. 0.14.2 Added * Support `client.get(..., auth=None)` to bypass the default authentication on a clients. * Support `client.auth = ...` property setter. * Support `httpx.get(..., proxies=...)` on top-level request functions. * Display instances with nicer import styles. (Eg. ) * Support `cookies=[(key, value)]` list-of-two-tuples style usage. Fixed * Ensure that automatically included headers on a request may be modified. * Allow explicit `Content-Length` header on streaming requests. * Handle URL quoted usernames and passwords properly. * Use more consistent default for `HEAD` requests, setting `allow_redirects=True`. * If a transport error occurs while streaming the response, raise an `httpx` exception, not the underlying `httpcore` exception. * Include the underlying `httpcore` traceback, when transport exceptions occur. 0.14.1 Added * The `httpx.URL(...)` class now raises `httpx.InvalidURL` on invalid URLs, rather than exposing the underlying `rfc3986` exception. If a redirect response includes an invalid 'Location' header, then a `RemoteProtocolError` exception is raised, which will be associated with the request that caused it. Fixed * Handling multiple `Set-Cookie` headers became broken in the 0.14.0 release, and is now resolved. 0.14.0 The 0.14 release includes a range of improvements to the public API, intended on preparing for our upcoming 1.0 release. * Our HTTP/2 support is now fully optional. **You now need to use `pip install httpx[http2]` if you want to include the HTTP/2 dependancies.** * Our HSTS support has now been removed. Rewriting URLs from `http` to `https` if the host is on the HSTS list can be beneficial in avoiding roundtrips to incorrectly formed URLs, but on balance we've decided to remove this feature, on the principle of least surprise. Most programmatic clients do not include HSTS support, and for now we're opting to remove our support for it. * Our exception hierarchy has been overhauled. Most users will want to stick with their existing `httpx.HTTPError` usage, but we've got a clearer overall structure now. See https://www.python-httpx.org/exceptions/ for more details. When upgrading you should be aware of the following public API changes. Note that deprecated usages will currently continue to function, but will issue warnings. * You should now use `httpx.codes` consistently instead of `httpx.StatusCodes`. * Usage of `httpx.Timeout()` should now always include an explicit default. Eg. `httpx.Timeout(None, pool=5.0)`. * When using `httpx.Timeout()`, we now have more concisely named keyword arguments. Eg. `read=5.0`, instead of `read_timeout=5.0`. * Use `httpx.Limits()` instead of `httpx.PoolLimits()`, and `limits=...` instead of `pool_limits=...`. * The `httpx.Limits(max_keepalive=...)` argument is now deprecated in favour of a more explicit `httpx.Limits(max_keepalive_connections=...)`. * Keys used with `Client(proxies={...})` should now be in the style of `{"http://": ...}`, rather than `{"http": ...}`. * The multidict methods `Headers.getlist()` and `QueryParams.getlist()` are deprecated in favour of more consistent `.get_list()` variants. * The `URL.is_ssl` property is deprecated in favour of `URL.scheme == "https"`. * The `URL.join(relative_url=...)` method is now `URL.join(url=...)`. This change does not support warnings for the deprecated usage style. One notable aspect of the 0.14.0 release is that it tightens up the public API for `httpx`, by ensuring that several internal attributes and methods have now become strictly private. The following previously had nominally public names on the client, but were all undocumented and intended solely for internal usage. They are all now replaced with underscored names, and should not be relied on or accessed. These changes should not affect users who have been working from the `httpx` documentation. * `.merge_url()`, `.merge_headers()`, `.merge_cookies()`, `.merge_queryparams()` * `.build_auth()`, `.build_redirect_request()` * `.redirect_method()`, `.redirect_url()`, `.redirect_headers()`, `.redirect_stream()` * `.send_handling_redirects()`, `.send_handling_auth()`, `.send_single_request()` * `.init_transport()`, `.init_proxy_transport()` * `.proxies`, `.transport`, `.netrc`, `.get_proxy_map()` Some areas of API which were already on the deprecation path, and were raising warnings or errors in 0.13.x have now been escalated to being fully removed. * Drop `ASGIDispatch`, `WSGIDispatch`, which have been replaced by `ASGITransport`, `WSGITransport`. * Drop `dispatch=...`` on client, which has been replaced by `transport=...`` * Drop `soft_limit`, `hard_limit`, which have been replaced by `max_keepalive` and `max_connections`. * Drop `Response.stream` and` `Response.raw`, which have been replaced by ``.aiter_bytes` and `.aiter_raw`. * Drop `proxies=` in favor of `proxies=httpx.Proxy(...)`. Added * Added dedicated exception class `httpx.HTTPStatusError` for `.raise_for_status()` exceptions. * Added `httpx.create_ssl_context()` helper function. * Support for proxy exlcusions like `proxies={"https://www.example.com": None}`. * Support `QueryParams(None)` and `client.params = None`. Changed * Use `httpx.codes` consistently in favour of `httpx.StatusCodes` which is placed into deprecation. * Usage of `httpx.Timeout()` should now always include an explicit default. Eg. `httpx.Timeout(None, pool=5.0)`. * Switch to more concise `httpx.Timeout()` keyword arguments. Eg. `read=5.0`, instead of `read_timeout=5.0`. * Use `httpx.Limits()` instead of `httpx.PoolLimits()`, and `limits=...` instead of `pool_limits=...`. * Keys used with `Client(proxies={...})` should now be in the style of `{"http://": ...}`, rather than `{"http": ...}`. * The multidict methods `Headers.getlist` and `QueryParams.getlist` are deprecated in favour of more consistent `.get_list()` variants. * `URL.port` becomes `Optional[int]`. Now only returns a port if one is explicitly included in the URL string. * The `URL(..., allow_relative=[bool])` parameter no longer exists. All URL instances may be relative. * Drop unnecessary `url.full_path = ...` property setter. * The `URL.join(relative_url=...)` method is now `URL.join(url=...)`. * The `URL.is_ssl` property is deprecated in favour of `URL.scheme == "https"`. Fixed * Add missing `Response.next()` method. * Ensure all exception classes are exposed as public API. * Support multiple items with an identical field name in multipart encodings. * Skip HSTS preloading on single-label domains. * Fixes for `Response.iter_lines()`. * Ignore permission errors when accessing `.netrc` files. * Allow bare hostnames in `HTTP_PROXY` etc... environment variables. * Settings `app=...` or `transport=...` bypasses any environment based proxy defaults. * Fix handling of `.base_url` when a path component is included in the base URL. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.6 2020/06/03 14:21:26 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.15.4 @ 1.6 log @py-httpx: updated to 0.13.3 0.13.3: Fixed * Include missing keepalive expiry configuration. * Improved error message when URL redirect has a custom scheme. 0.13.2: Fixed * Include explicit "Content-Length: 0" on POST, PUT, PATCH if no request body is used. * Add `http2` option to `httpx.Client`. * Tighten up API typing in places. 0.13.1: Fixed * Fix pool options deprecation warning. * Include `httpx.URLLib3ProxyTransport` in top-level API. 0.13.0: This release switches to `httpcore` for all the internal networking, which means: * We're using the same codebase for both our sync and async clients. * HTTP/2 support is now available with the sync client. * We no longer have a `urllib3` dependency for our sync client, although there is still an *optional* `URLLib3Transport` class. It also means we've had to remove our UDS support, since maintaining that would have meant having to push back our work towards a 1.0 release, which isn't a trade-off we wanted to make. We also now have [a public "Transport API"](https://www.python-httpx.org/advanced/#custom-transports), which you can use to implement custom transport implementations against. This formalises and replaces our previously private "Dispatch API". Changed * Use `httpcore` for underlying HTTP transport. Drop `urllib3` requirement. * Rename pool limit options from `soft_limit`/`hard_limit` to `max_keepalive`/`max_connections`. * The previous private "Dispatch API" has now been promoted to a public "Transport API". When customizing the transport use `transport=...`. The `ASGIDispatch` and `WSGIDispatch` class naming is deprecated in favour of `ASGITransport` and `WSGITransport`. Added * Added `URLLib3Transport` class for optional `urllib3` transport support. * Streaming multipart uploads. * Logging via HTTPCORE_LOG_LEVEL and HTTPX_LOG_LEVEL environment variables and TRACE level logging. Fixed * Performance improvement in brotli decoder. * Proper warning level of deprecation notice in `Response.stream` and `Response.raw`. * Fix support for generator based WSGI apps. * Reuse of connections on HTTP/2 in close concurrency situations. * Honor HTTP/2 max concurrent streams settings * Fix bytes support in multipart uploads. * Improve typing support for `files=...`. Removed * Dropped support for `Client(uds=...)` @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.5 2020/03/20 07:43:06 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.13.3 d14 1 a14 4 DEPENDS+= ${PYPKGPREFIX}-chardet>=3.0.0:../../converters/py-chardet DEPENDS+= ${PYPKGPREFIX}-httpcore>=0.9.0:../../www/py-httpcore DEPENDS+= ${PYPKGPREFIX}-hstspreload-[0-9]*:../../www/py-hstspreload DEPENDS+= ${PYPKGPREFIX}-idna>=2.0:../../www/py-idna @ 1.5 log @py-httpx: updated to 0.12.1 0.12.1: Fixed * Resolved packaging issue, where additional files were being included. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.4 2020/03/10 07:36:16 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.12.1 d15 1 a15 2 DEPENDS+= ${PYPKGPREFIX}-h11>=0.8.0:../../www/py-h11 DEPENDS+= ${PYPKGPREFIX}-h2>=3.0:../../www/py-h2 d19 1 a19 1 DEPENDS+= ${PYPKGPREFIX}-sniffio>=1.0.0:../../misc/py-sniffio @ 1.4 log @py-httpx: updated to 0.12.0 0.12.0: The 0.12 release tightens up the API expectations for httpx by switching to private module names to enforce better clarity around public API. All imports of httpx should import from the top-level package only, such as from httpx import Request, rather than importing from privately namespaced modules such as from httpx._models import Request. Added Support making response body available to auth classes with .requires_response_body. Export NetworkError exception. Add support for NO_PROXY environment variable. Changed Switched to private module names. Drop redirect looping detection and the RedirectLoop exception, instead using TooManyRedirects. Drop backend=... parameter on AsyncClient, in favour of always autodetecting trio/asyncio. Fixed Support basic auth credentials in proxy URLs. Fix httpx.Proxy(url, mode="FORWARD_ONLY") configuration. Fallback to setting headers as UTF-8 if no encoding is specified. Close proxy dispatches classes on client close. Support custom cert parameters even if verify=False. Don't support invalid dict-of-dicts form data in data=.... @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.3 2020/01/20 11:50:48 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.12.0 @ 1.3 log @py-httpx: updated to 0.11.1 0.11.1: Fixed * Fixed usage of `proxies=...` on `Client()`. * Support both `zlib` and `deflate` style encodings on `Content-Encoding: deflate`. * Fix for streaming a redirect response body with `allow_redirects=False`. * Handle redirect with malformed Location headers missing host. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.2 2020/01/14 16:10:53 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.11.1 @ 1.2 log @py-httpx: updated to 0.11.0 0.11.0: The 0.11 release reintroduces our sync support, so that `httpx` now supports both a standard thread-concurrency API, and an async API. Existing async `httpx` users that are upgrading to 0.11 should ensure that: * Async codebases should always use a client instance to make requests, instead of the top-level API. * The async client is named as `httpx.AsyncClient()`, instead of `httpx.Client()`. * When instantiating proxy configurations use the `httpx.Proxy()` class, instead of the previous `httpx.HTTPProxy()`. This new configuration class works for configuring both sync and async clients. We believe the API is now pretty much stable, and are aiming for a 1.0 release sometime on or before April 2020. Changed - Top level API such as `httpx.get(url, ...)`, `httpx.post(url, ...)`, `httpx.request(method, url, ...)` becomes synchronous. - Added `httpx.Client()` for synchronous clients, with `httpx.AsyncClient` being used for async clients. - Switched to `proxies=httpx.Proxy(...)` for proxy configuration. - Network connection errors are wrapped in `httpx.NetworkError`, rather than exposing lower-level exception types directly. Removed - The `request.url.origin` property and `httpx.Origin` class are no longer available. - The per-request `cert`, `verify`, and `trust_env` arguments are escalated from raising errors if used, to no longer being available. These arguments should be used on a per-client instance instead, or in the top-level API. - The `stream` argument has escalated from raising an error when used, to no longer being available. Use the `client.stream(...)` or `httpx.stream()` streaming API instead. Fixed - Redirect loop detection matches against `(method, url)` rather than `url`. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.1 2020/01/08 20:54:27 adam Exp $ d3 1 a3 1 DISTNAME= httpx-0.11.0 @ 1.1 log @py-httpx: added version 0.10.1 HTTPX is a fully featured HTTP client for Python 3, which provides sync and async APIs, and support for both HTTP/1.1 and HTTP/2. @ text @d1 1 a1 1 # $NetBSD$ d3 1 a3 1 DISTNAME= httpx-0.10.1 @