2022-05-24 14:31:21 +02:00
|
|
|
# $NetBSD: Makefile,v 1.24 2022/05/24 12:31:21 adam Exp $
|
2020-01-08 21:54:27 +01:00
|
|
|
|
2022-05-24 14:31:21 +02:00
|
|
|
DISTNAME= httpx-0.23.0
|
2020-01-08 21:54:27 +01:00
|
|
|
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
|
2022-05-24 14:31:21 +02:00
|
|
|
DEPENDS+= ${PYPKGPREFIX}-httpcore>=0.15.0:../../www/py-httpcore
|
2020-01-08 21:54:27 +01:00
|
|
|
DEPENDS+= ${PYPKGPREFIX}-rfc3986>=1.3:../../www/py-rfc3986
|
2020-06-03 16:21:26 +02:00
|
|
|
DEPENDS+= ${PYPKGPREFIX}-sniffio-[0-9]*:../../misc/py-sniffio
|
2020-01-08 21:54:27 +01:00
|
|
|
|
|
|
|
USE_LANGUAGES= # none
|
|
|
|
|
2022-01-27 09:37:57 +01:00
|
|
|
PYTHON_VERSIONS_INCOMPATIBLE= 27
|
2020-01-08 21:54:27 +01:00
|
|
|
|
2022-01-05 16:40:56 +01:00
|
|
|
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}
|
|
|
|
|
2020-01-08 21:54:27 +01:00
|
|
|
.include "../../lang/python/egg.mk"
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|