pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/py-httpcore py-httpcore: updated to 0.11.1



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0d7a5f2c28d8
branches:  trunk
changeset: 439968:0d7a5f2c28d8
user:      adam <adam%pkgsrc.org@localhost>
date:      Thu Oct 01 06:48:37 2020 +0000

description:
py-httpcore: updated to 0.11.1

0.11.1

Fixed
- Add await to async semaphore release() coroutine
- Drop incorrect curio classifier


0.11.0

The Transport API with 0.11.0 has a couple of significant changes.

Firstly we've moved changed the request interface in order to allow extensions, which will later enable us to support features
such as trailing headers, HTTP/2 server push, and CONNECT/Upgrade connections.

The interface changes from:

```python
def request(method, url, headers, stream, timeout):
    return (http_version, status_code, reason, headers, stream)
```

To instead including an optional dictionary of extensions on the request and response:

```python
def request(method, url, headers, stream, ext):
    return (status_code, headers, stream, ext)
```

Having an open-ended extensions point will allow us to add later support for various optional features, that wouldn't otherwise be supported without these API changes.

In particular:

* Trailing headers support.
* HTTP/2 Server Push
* sendfile.
* Exposing raw connection on CONNECT, Upgrade, HTTP/2 bi-di streaming.
* Exposing debug information out of the API, including template name, template context.

Currently extensions are limited to:

* request: `timeout` - Optional. Timeout dictionary.
* response: `http_version` - Optional. Include the HTTP version used on the response.
* response: `reason` - Optional. Include the reason phrase used on the response. Only valid with HTTP/1.*.

See https://github.com/encode/httpx/issues/1274#issuecomment-694884553 for the history behind this.

Secondly, the async version of `request` is now namespaced as `arequest`.

This allows concrete transports to support both sync and async implementations on the same class.

Added
- Add curio support.
- Add anyio support, with `backend="anyio"`.

Changed
- Update the Transport API to use 'ext' for optional extensions.
- Update the Transport API to use `.request` and `.arequest` so implementations can support both sync and async.


0.10.2

Added
- Added Unix Domain Socket support.

Fixed
- Always include the port on proxy CONNECT requests.
- Fix `max_keepalive_connections` configuration.
- Fixes behaviour in HTTP/1.1 where server disconnects can be used to signal the end of the response body.

0.10.1
- Include `max_keepalive_connections` on `AsyncHTTPProxy`/`SyncHTTPProxy` classes.


0.10.0

The most notable change in the 0.10.0 release is that HTTP/2 support is now fully optional.

Use either `pip install httpcore` for HTTP/1.1 support only, or `pip install httpcore[http2]` for HTTP/1.1 and HTTP/2 support.

Added
- HTTP/2 support becomes optional.
- Add `local_address=...` support.
- Add `PlainByteStream`, `IteratorByteStream`, `AsyncIteratorByteStream`. The `AsyncByteSteam` and `SyncByteStream` classes are now pure interface classes.
- Add `LocalProtocolError`, `RemoteProtocolError` exceptions.
- Add `UnsupportedProtocol` exception.
- Add `.get_connection_info()` method.
- Add better TRACE logs.

Changed
- `max_keepalive` is deprecated in favour of `max_keepalive_connections`.

Fixed
- Improve handling of server disconnects.

diffstat:

 www/py-httpcore/Makefile |   4 ++--
 www/py-httpcore/PLIST    |  17 ++++++++++++++++-
 www/py-httpcore/distinfo |  10 +++++-----
 3 files changed, 23 insertions(+), 8 deletions(-)

diffs (85 lines):

diff -r 3e205485f2cd -r 0d7a5f2c28d8 www/py-httpcore/Makefile
--- a/www/py-httpcore/Makefile  Thu Oct 01 03:38:19 2020 +0000
+++ b/www/py-httpcore/Makefile  Thu Oct 01 06:48:37 2020 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.1 2020/06/03 14:18:43 adam Exp $
+# $NetBSD: Makefile,v 1.2 2020/10/01 06:48:37 adam Exp $
 
-DISTNAME=      httpcore-0.9.1
+DISTNAME=      httpcore-0.11.1
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    www python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=h/httpcore/}
diff -r 3e205485f2cd -r 0d7a5f2c28d8 www/py-httpcore/PLIST
--- a/www/py-httpcore/PLIST     Thu Oct 01 03:38:19 2020 +0000
+++ b/www/py-httpcore/PLIST     Thu Oct 01 06:48:37 2020 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2020/06/03 14:18:43 adam Exp $
+@comment $NetBSD: PLIST,v 1.2 2020/10/01 06:48:37 adam Exp $
 ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
 ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
 ${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
@@ -20,6 +20,9 @@
 ${PYSITELIB}/httpcore/_async/connection_pool.py
 ${PYSITELIB}/httpcore/_async/connection_pool.pyc
 ${PYSITELIB}/httpcore/_async/connection_pool.pyo
+${PYSITELIB}/httpcore/_async/http.py
+${PYSITELIB}/httpcore/_async/http.pyc
+${PYSITELIB}/httpcore/_async/http.pyo
 ${PYSITELIB}/httpcore/_async/http11.py
 ${PYSITELIB}/httpcore/_async/http11.pyc
 ${PYSITELIB}/httpcore/_async/http11.pyo
@@ -32,6 +35,9 @@
 ${PYSITELIB}/httpcore/_backends/__init__.py
 ${PYSITELIB}/httpcore/_backends/__init__.pyc
 ${PYSITELIB}/httpcore/_backends/__init__.pyo
+${PYSITELIB}/httpcore/_backends/anyio.py
+${PYSITELIB}/httpcore/_backends/anyio.pyc
+${PYSITELIB}/httpcore/_backends/anyio.pyo
 ${PYSITELIB}/httpcore/_backends/asyncio.py
 ${PYSITELIB}/httpcore/_backends/asyncio.pyc
 ${PYSITELIB}/httpcore/_backends/asyncio.pyo
@@ -41,12 +47,18 @@
 ${PYSITELIB}/httpcore/_backends/base.py
 ${PYSITELIB}/httpcore/_backends/base.pyc
 ${PYSITELIB}/httpcore/_backends/base.pyo
+${PYSITELIB}/httpcore/_backends/curio.py
+${PYSITELIB}/httpcore/_backends/curio.pyc
+${PYSITELIB}/httpcore/_backends/curio.pyo
 ${PYSITELIB}/httpcore/_backends/sync.py
 ${PYSITELIB}/httpcore/_backends/sync.pyc
 ${PYSITELIB}/httpcore/_backends/sync.pyo
 ${PYSITELIB}/httpcore/_backends/trio.py
 ${PYSITELIB}/httpcore/_backends/trio.pyc
 ${PYSITELIB}/httpcore/_backends/trio.pyo
+${PYSITELIB}/httpcore/_bytestreams.py
+${PYSITELIB}/httpcore/_bytestreams.pyc
+${PYSITELIB}/httpcore/_bytestreams.pyo
 ${PYSITELIB}/httpcore/_exceptions.py
 ${PYSITELIB}/httpcore/_exceptions.pyc
 ${PYSITELIB}/httpcore/_exceptions.pyo
@@ -62,6 +74,9 @@
 ${PYSITELIB}/httpcore/_sync/connection_pool.py
 ${PYSITELIB}/httpcore/_sync/connection_pool.pyc
 ${PYSITELIB}/httpcore/_sync/connection_pool.pyo
+${PYSITELIB}/httpcore/_sync/http.py
+${PYSITELIB}/httpcore/_sync/http.pyc
+${PYSITELIB}/httpcore/_sync/http.pyo
 ${PYSITELIB}/httpcore/_sync/http11.py
 ${PYSITELIB}/httpcore/_sync/http11.pyc
 ${PYSITELIB}/httpcore/_sync/http11.pyo
diff -r 3e205485f2cd -r 0d7a5f2c28d8 www/py-httpcore/distinfo
--- a/www/py-httpcore/distinfo  Thu Oct 01 03:38:19 2020 +0000
+++ b/www/py-httpcore/distinfo  Thu Oct 01 06:48:37 2020 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.1 2020/06/03 14:18:43 adam Exp $
+$NetBSD: distinfo,v 1.2 2020/10/01 06:48:37 adam Exp $
 
-SHA1 (httpcore-0.9.1.tar.gz) = 7a8013ad9010f7eb9cf3473208910b4b54ff6ef3
-RMD160 (httpcore-0.9.1.tar.gz) = 4e2d6d3a552d801c993f9b763ecf46b1a3343546
-SHA512 (httpcore-0.9.1.tar.gz) = 53bb0ece7869bdbe249659f11f7972b14ba00ee97c5692c1fec44febbc8300e9495aa72e3c63291983c75a4e249702655eb7e26f86b1e718e2f34bc6851d1b3e
-Size (httpcore-0.9.1.tar.gz) = 31911 bytes
+SHA1 (httpcore-0.11.1.tar.gz) = e6d5894091ab5f8a17cac0bed2812ccddd5b36f6
+RMD160 (httpcore-0.11.1.tar.gz) = 9fe7d5d95400a7d5cd976203a11550271dc88182
+SHA512 (httpcore-0.11.1.tar.gz) = 41f245a9e72f8eb1a5b12ff2299ed52bbecde66359f0a77135e4433414a6132dc2d07e932187ce5c10c106661920a57e95c81f9ba12e21078e83dcbb4edc2311
+Size (httpcore-0.11.1.tar.gz) = 39987 bytes



Home | Main Index | Thread Index | Old Index