Skip to content

Commit

Permalink
www/py-httpx: Allow build with py-httpcore 0.18.0+
Browse files Browse the repository at this point in the history
- Bump PORTREVISION for package change

Obtained from:	encode/httpx#2803
  • Loading branch information
sunpoet committed Sep 11, 2023
1 parent 4af8c89 commit e547a4c
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
3 changes: 2 additions & 1 deletion www/py-httpx/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
PORTNAME= httpx
PORTVERSION= 0.24.1
PORTREVISION= 1
CATEGORIES= www python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
Expand All @@ -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}

Expand Down
41 changes: 41 additions & 0 deletions www/py-httpx/files/patch-httpcore
Original file line number Diff line number Diff line change
@@ -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",
]

0 comments on commit e547a4c

Please sign in to comment.