git: fa33c95f190a - main - www/py-httpcore: Update to 0.16.1

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Fri, 30 Dec 2022 09:13:11 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fa33c95f190a6db85309ea06a91e7622854ab323

commit fa33c95f190a6db85309ea06a91e7622854ab323
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-12-30 08:46:40 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-12-30 09:05:14 +0000

    www/py-httpcore: Update to 0.16.1
    
    Changes:        https://github.com/encode/httpcore/releases
---
 www/py-httpcore/Makefile                           |  3 +-
 www/py-httpcore/distinfo                           |  6 +-
 .../files/patch-httpcore-_async-http11.py          | 78 ----------------------
 .../files/patch-httpcore-_sync-http11.py           | 78 ----------------------
 www/py-httpcore/files/patch-setup.py               | 13 ----
 5 files changed, 4 insertions(+), 174 deletions(-)

diff --git a/www/py-httpcore/Makefile b/www/py-httpcore/Makefile
index 6d80408f8123..c2254aaca0d4 100644
--- a/www/py-httpcore/Makefile
+++ b/www/py-httpcore/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	httpcore
-PORTVERSION=	0.15.0
-PORTREVISION=	1
+PORTVERSION=	0.16.1
 CATEGORIES=	www python
 MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
diff --git a/www/py-httpcore/distinfo b/www/py-httpcore/distinfo
index 3a103e76a830..fca961de7579 100644
--- a/www/py-httpcore/distinfo
+++ b/www/py-httpcore/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1653151162
-SHA256 (httpcore-0.15.0.tar.gz) = 18b68ab86a3ccf3e7dc0f43598eaddcf472b602aba29f9aa6ab85fe2ada3980b
-SIZE (httpcore-0.15.0.tar.gz) = 53669
+TIMESTAMP = 1669058001
+SHA256 (httpcore-0.16.1.tar.gz) = 3d3143ff5e1656a5740ea2f0c167e8e9d48c5a9bbd7f00ad1f8cff5711b08543
+SIZE (httpcore-0.16.1.tar.gz) = 54005
diff --git a/www/py-httpcore/files/patch-httpcore-_async-http11.py b/www/py-httpcore/files/patch-httpcore-_async-http11.py
deleted file mode 100644
index 41c562a0ec95..000000000000
--- a/www/py-httpcore/files/patch-httpcore-_async-http11.py
+++ /dev/null
@@ -1,78 +0,0 @@
-Obtained from:	https://github.com/encode/httpcore/commit/4cf288e0007cb73561b9020af9228f076ba2a94e
-
---- httpcore/_async/http11.py.orig	2022-05-17 12:45:06 UTC
-+++ httpcore/_async/http11.py
-@@ -1,7 +1,16 @@
- import enum
- import time
- from types import TracebackType
--from typing import AsyncIterable, AsyncIterator, List, Optional, Tuple, Type, Union
-+from typing import (
-+    AsyncIterable,
-+    AsyncIterator,
-+    List,
-+    Optional,
-+    Tuple,
-+    Type,
-+    Union,
-+    cast,
-+)
- 
- import h11
- 
-@@ -17,13 +26,11 @@ from .._trace import Trace
- from ..backends.base import AsyncNetworkStream
- from .interfaces import AsyncConnectionInterface
- 
--H11Event = Union[
-+# A subset of `h11.Event` types supported by `_send_event`
-+H11SendEvent = Union[
-     h11.Request,
--    h11.Response,
--    h11.InformationalResponse,
-     h11.Data,
-     h11.EndOfMessage,
--    h11.ConnectionClosed,
- ]
- 
- 
-@@ -127,14 +134,14 @@ class AsyncHTTP11Connection(AsyncConnectionInterface):
-             event = h11.Data(data=chunk)
-             await self._send_event(event, timeout=timeout)
- 
--        event = h11.EndOfMessage()
--        await self._send_event(event, timeout=timeout)
-+        await self._send_event(h11.EndOfMessage(), timeout=timeout)
- 
-     async def _send_event(
--        self, event: H11Event, timeout: Optional[float] = None
-+        self, event: h11.Event, timeout: Optional[float] = None
-     ) -> None:
-         bytes_to_send = self._h11_state.send(event)
--        await self._network_stream.write(bytes_to_send, timeout=timeout)
-+        if bytes_to_send is not None:
-+            await self._network_stream.write(bytes_to_send, timeout=timeout)
- 
-     # Receiving the response...
- 
-@@ -168,7 +175,9 @@ class AsyncHTTP11Connection(AsyncConnectionInterface):
-             elif isinstance(event, (h11.EndOfMessage, h11.PAUSED)):
-                 break
- 
--    async def _receive_event(self, timeout: Optional[float] = None) -> H11Event:
-+    async def _receive_event(
-+        self, timeout: Optional[float] = None
-+    ) -> Union[h11.Event, Type[h11.PAUSED]]:
-         while True:
-             with map_exceptions({h11.RemoteProtocolError: RemoteProtocolError}):
-                 event = self._h11_state.next_event()
-@@ -192,7 +201,8 @@ class AsyncHTTP11Connection(AsyncConnectionInterface):
- 
-                 self._h11_state.receive_data(data)
-             else:
--                return event
-+                # mypy fails to narrow the type in the above if statement above
-+                return cast(Union[h11.Event, Type[h11.PAUSED]], event)
- 
-     async def _response_closed(self) -> None:
-         async with self._state_lock:
diff --git a/www/py-httpcore/files/patch-httpcore-_sync-http11.py b/www/py-httpcore/files/patch-httpcore-_sync-http11.py
deleted file mode 100644
index 3091478c3ac3..000000000000
--- a/www/py-httpcore/files/patch-httpcore-_sync-http11.py
+++ /dev/null
@@ -1,78 +0,0 @@
-Obtained from:	https://github.com/encode/httpcore/commit/4cf288e0007cb73561b9020af9228f076ba2a94e
-
---- httpcore/_sync/http11.py.orig	2022-05-17 12:45:06 UTC
-+++ httpcore/_sync/http11.py
-@@ -1,7 +1,16 @@
- import enum
- import time
- from types import TracebackType
--from typing import Iterable, Iterator, List, Optional, Tuple, Type, Union
-+from typing import (
-+    Iterable,
-+    Iterator,
-+    List,
-+    Optional,
-+    Tuple,
-+    Type,
-+    Union,
-+    cast,
-+)
- 
- import h11
- 
-@@ -17,13 +26,11 @@ from .._trace import Trace
- from ..backends.base import NetworkStream
- from .interfaces import ConnectionInterface
- 
--H11Event = Union[
-+# A subset of `h11.Event` types supported by `_send_event`
-+H11SendEvent = Union[
-     h11.Request,
--    h11.Response,
--    h11.InformationalResponse,
-     h11.Data,
-     h11.EndOfMessage,
--    h11.ConnectionClosed,
- ]
- 
- 
-@@ -127,14 +134,14 @@ class HTTP11Connection(ConnectionInterface):
-             event = h11.Data(data=chunk)
-             self._send_event(event, timeout=timeout)
- 
--        event = h11.EndOfMessage()
--        self._send_event(event, timeout=timeout)
-+        self._send_event(h11.EndOfMessage(), timeout=timeout)
- 
-     def _send_event(
--        self, event: H11Event, timeout: Optional[float] = None
-+        self, event: h11.Event, timeout: Optional[float] = None
-     ) -> None:
-         bytes_to_send = self._h11_state.send(event)
--        self._network_stream.write(bytes_to_send, timeout=timeout)
-+        if bytes_to_send is not None:
-+            self._network_stream.write(bytes_to_send, timeout=timeout)
- 
-     # Receiving the response...
- 
-@@ -168,7 +175,9 @@ class HTTP11Connection(ConnectionInterface):
-             elif isinstance(event, (h11.EndOfMessage, h11.PAUSED)):
-                 break
- 
--    def _receive_event(self, timeout: Optional[float] = None) -> H11Event:
-+    def _receive_event(
-+        self, timeout: Optional[float] = None
-+    ) -> Union[h11.Event, Type[h11.PAUSED]]:
-         while True:
-             with map_exceptions({h11.RemoteProtocolError: RemoteProtocolError}):
-                 event = self._h11_state.next_event()
-@@ -192,7 +201,8 @@ class HTTP11Connection(ConnectionInterface):
- 
-                 self._h11_state.receive_data(data)
-             else:
--                return event
-+                # mypy fails to narrow the type in the above if statement above
-+                return cast(Union[h11.Event, Type[h11.PAUSED]], event)
- 
-     def _response_closed(self) -> None:
-         with self._state_lock:
diff --git a/www/py-httpcore/files/patch-setup.py b/www/py-httpcore/files/patch-setup.py
deleted file mode 100644
index d804a6bc020a..000000000000
--- a/www/py-httpcore/files/patch-setup.py
+++ /dev/null
@@ -1,13 +0,0 @@
-Obtained from:	https://github.com/encode/httpcore/commit/4cf288e0007cb73561b9020af9228f076ba2a94e
-
---- setup.py.orig	2022-05-17 12:45:06 UTC
-+++ setup.py
-@@ -54,7 +54,7 @@ setup(
-     include_package_data=True,
-     zip_safe=False,
-     install_requires=[
--        "h11>=0.11,<0.13",
-+        "h11>=0.13,<0.15",
-         "sniffio==1.*",
-         "anyio==3.*",
-         "certifi",