git: e547a4c33f2c - main - www/py-httpx: Allow build with py-httpcore 0.18.0+

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 11 Sep 2023 03:14:51 UTC
The branch main has been updated by sunpoet:

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

commit e547a4c33f2c6bd3b6e105d66982fb5c49bea118
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-09-11 03:09:17 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-09-11 03:11:33 +0000

    www/py-httpx: Allow build with py-httpcore 0.18.0+
    
    - Bump PORTREVISION for package change
    
    Obtained from:  https://github.com/encode/httpx/pull/2803
---
 www/py-httpx/Makefile             |  3 ++-
 www/py-httpx/files/patch-httpcore | 41 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/www/py-httpx/Makefile b/www/py-httpx/Makefile
index 387737c22ab0..1f4e483f7732 100644
--- a/www/py-httpx/Makefile
+++ b/www/py-httpx/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	httpx
 PORTVERSION=	0.24.1
+PORTREVISION=	1
 CATEGORIES=	www python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -14,7 +15,7 @@ LICENSE_FILE=	${WRKSRC}/LICENSE.md
 BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}hatch-fancy-pypi-readme>=0:devel/py-hatch-fancy-pypi-readme@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}hatchling>=0:devel/py-hatchling@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}certifi>=0:security/py-certifi@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}httpcore>=0.15.0<0.18.0:www/py-httpcore@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}httpcore>=0.18.0<0.19.0:www/py-httpcore@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}idna>=0:dns/py-idna@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}sniffio>=0:devel/py-sniffio@${PY_FLAVOR}
 
diff --git a/www/py-httpx/files/patch-httpcore b/www/py-httpx/files/patch-httpcore
new file mode 100644
index 000000000000..e2dd8caca829
--- /dev/null
+++ b/www/py-httpx/files/patch-httpcore
@@ -0,0 +1,41 @@
+Obtained from:	https://github.com/encode/httpx/pull/2803
+
+--- httpx/_types.py.orig	2020-02-02 00:00:00 UTC
++++ httpx/_types.py
+@@ -16,6 +16,7 @@ from typing import (
+     Iterator,
+     List,
+     Mapping,
++    MutableMapping,
+     NamedTuple,
+     Optional,
+     Sequence,
+@@ -87,7 +88,7 @@ AuthTypes = Union[
+ 
+ RequestContent = Union[str, bytes, Iterable[bytes], AsyncIterable[bytes]]
+ ResponseContent = Union[str, bytes, Iterable[bytes], AsyncIterable[bytes]]
+-ResponseExtensions = Mapping[str, Any]
++ResponseExtensions = MutableMapping[str, Any]
+ 
+ RequestData = Mapping[str, Any]
+ 
+@@ -104,7 +105,7 @@ FileTypes = Union[
+ ]
+ RequestFiles = Union[Mapping[str, FileTypes], Sequence[Tuple[str, FileTypes]]]
+ 
+-RequestExtensions = Mapping[str, Any]
++RequestExtensions = MutableMapping[str, Any]
+ 
+ 
+ class SyncByteStream:
+--- pyproject.toml.orig	2020-02-02 00:00:00 UTC
++++ pyproject.toml
+@@ -29,7 +29,7 @@ classifiers = [
+ ]
+ dependencies = [
+     "certifi",
+-    "httpcore>=0.15.0,<0.18.0",
++    "httpcore>=0.18.0,<0.19.0",
+     "idna",
+     "sniffio",
+ ]