pkgsrc/www/py-httpx/Makefile

31 lines
912 B
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.24 2022/05/24 12:31:21 adam Exp $
DISTNAME= httpx-0.23.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
DEPENDS+= ${PYPKGPREFIX}-certifi-[0-9]*:../../security/py-certifi
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.
2021-10-21 15:16:15 +02:00
DEPENDS+= ${PYPKGPREFIX}-charset-normalizer-[0-9]*:../../converters/py-charset-normalizer
DEPENDS+= ${PYPKGPREFIX}-httpcore>=0.15.0:../../www/py-httpcore
DEPENDS+= ${PYPKGPREFIX}-rfc3986>=1.3:../../www/py-rfc3986
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=...)`
2020-06-03 16:21:26 +02:00
DEPENDS+= ${PYPKGPREFIX}-sniffio-[0-9]*:../../misc/py-sniffio
USE_LANGUAGES= # none
PYTHON_VERSIONS_INCOMPATIBLE= 27
USE_PKG_RESOURCES= yes
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.
2021-10-21 15:16:15 +02:00
post-install:
cd ${DESTDIR}${PREFIX}/bin && \
${MV} httpx httpx-${PYVERSSUFFIX} || ${TRUE}
.include "../../lang/python/egg.mk"
.include "../../mk/bsd.pkg.mk"