summaryrefslogtreecommitdiff
path: root/net/py-urllib3
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--net/py-urllib3-future/Makefile2
-rw-r--r--net/py-urllib3-future/distinfo6
-rw-r--r--net/py-urllib3-future/files/patch-pyproject.toml10
-rw-r--r--net/py-urllib3/Makefile11
-rw-r--r--net/py-urllib31/Makefile50
-rw-r--r--net/py-urllib31/distinfo3
-rw-r--r--net/py-urllib31/files/patch-setup.cfg11
-rw-r--r--net/py-urllib31/files/pkg-message.in21
-rw-r--r--net/py-urllib31/pkg-descr11
9 files changed, 105 insertions, 20 deletions
diff --git a/net/py-urllib3-future/Makefile b/net/py-urllib3-future/Makefile
index 58bc2f66dff4..0e6f13713482 100644
--- a/net/py-urllib3-future/Makefile
+++ b/net/py-urllib3-future/Makefile
@@ -1,5 +1,5 @@
PORTNAME= urllib3-future
-PORTVERSION= 2.12.922
+PORTVERSION= 2.13.903
CATEGORIES= net python
MASTER_SITES= PYPI \
https://github.com/jawah/urllib3.future/releases/download/${PORTVERSION}/
diff --git a/net/py-urllib3-future/distinfo b/net/py-urllib3-future/distinfo
index 1911697b359a..9e1f56ad9f80 100644
--- a/net/py-urllib3-future/distinfo
+++ b/net/py-urllib3-future/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1748107940
-SHA256 (urllib3_future-2.12.922.tar.gz) = 4cb9424398993016383b600ba20881217f10a99c45acac60019ffb0dd007bc8a
-SIZE (urllib3_future-2.12.922.tar.gz) = 1083098
+TIMESTAMP = 1755062574
+SHA256 (urllib3_future-2.13.903.tar.gz) = 750acf69304a174c2bd4a12a35ed1e1bd714ba1698e3b7262a3b37b3c68893a2
+SIZE (urllib3_future-2.13.903.tar.gz) = 1097689
diff --git a/net/py-urllib3-future/files/patch-pyproject.toml b/net/py-urllib3-future/files/patch-pyproject.toml
deleted file mode 100644
index 834db86a77d5..000000000000
--- a/net/py-urllib3-future/files/patch-pyproject.toml
+++ /dev/null
@@ -1,10 +0,0 @@
---- pyproject.toml.orig 2025-04-09 07:01:09 UTC
-+++ pyproject.toml
-@@ -40,7 +40,6 @@ dependencies = [
- requires-python = ">=3.7"
- dynamic = ["version"]
- dependencies = [
-- "qh3>=1.2.0,<2.0.0; (platform_python_implementation != 'CPython' or python_full_version > '3.7.10') and (platform_system == 'Darwin' or platform_system == 'Windows' or platform_system == 'Linux') and (platform_machine == 'x86_64' or platform_machine == 's390x' or platform_machine == 'armv7l' or platform_machine == 'ppc64le' or platform_machine == 'ppc64' or platform_machine == 'AMD64' or platform_machine == 'aarch64' or platform_machine == 'arm64' or platform_machine == 'ARM64' or platform_machine == 'x86' or platform_machine == 'i686') and (platform_python_implementation == 'CPython' or (platform_python_implementation == 'PyPy' and python_version < '3.12'))",
- "h11>=0.11.0,<1.0.0",
- "jh2>=5.0.3,<6.0.0",
- ]
diff --git a/net/py-urllib3/Makefile b/net/py-urllib3/Makefile
index a7a81cfa8900..9bcd0777a0f3 100644
--- a/net/py-urllib3/Makefile
+++ b/net/py-urllib3/Makefile
@@ -8,7 +8,8 @@ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= python@FreeBSD.org
COMMENT= HTTP library with thread-safe connection pooling, file post, and more
-WWW= https://github.com/urllib3/urllib3
+WWW= https://urllib3.readthedocs.io/en/stable/ \
+ https://github.com/urllib3/urllib3
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
@@ -26,16 +27,14 @@ TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}flaky>=3.6.1:devel/py-flaky@${PY_FLAVOR} \
USES= cpe python
USE_PYTHON= autoplist concurrent cryptography_test pep517 pytest
-CPE_VENDOR= python
-
NO_ARCH= yes
-TEST_ENV= LC_ALL=en_US.UTF-8 PYTHONPATH=${WRKSRC}/src
-
-# Test 'test_ssl_read_timeout' fails with FreeBSD >= 12.0. That was already the case with earlier versions of net/py-urllib3.
PYTEST_IGNORED_TESTS= test_ssl_read_timeout
+TEST_ENV= LC_ALL=en_US.UTF-8 PYTHONPATH=${WRKSRC}/src
SUB_FILES= pkg-message
+CPE_VENDOR= python
+
OPTIONS_DEFINE= BROTLI SOCKS SSL
OPTIONS_DEFAULT=SOCKS
diff --git a/net/py-urllib31/Makefile b/net/py-urllib31/Makefile
new file mode 100644
index 000000000000..c452313a1952
--- /dev/null
+++ b/net/py-urllib31/Makefile
@@ -0,0 +1,50 @@
+PORTNAME= urllib3
+PORTVERSION= 1.26.20
+CATEGORIES= net python
+MASTER_SITES= PYPI \
+ https://github.com/urllib3/urllib3/releases/download/${PORTVERSION}/
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+PKGNAMESUFFIX= 1
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= HTTP library with thread-safe connection pooling, file post, and more
+WWW= https://urllib3.readthedocs.io/en/stable/ \
+ https://github.com/urllib3/urllib3
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}flaky>=3.6.1:devel/py-flaky@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}mock>=0:devel/py-mock@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pysocks>=1.5.6:net/py-pysocks@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytest-timeout>=0:devel/py-pytest-timeout@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}python-dateutil>=2.8.1:devel/py-python-dateutil@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}tornado>=0:www/py-tornado@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}trustme>=0.6.0:security/py-trustme@${PY_FLAVOR}
+
+USES= cpe python
+USE_PYTHON= autoplist concurrent cryptography_test pep517 pytest
+
+NO_ARCH= yes
+PYTEST_IGNORED_TESTS= test_ssl_read_timeout
+TEST_ENV= LC_ALL=en_US.UTF-8 PYTHONPATH=${WRKSRC}/src
+
+SUB_FILES= pkg-message
+
+CPE_VENDOR= python
+
+PORTSCOUT= limit:^1\.
+
+OPTIONS_DEFINE= BROTLI SOCKS SSL
+OPTIONS_DEFAULT=SOCKS
+
+BROTLI_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}brotli>=1.0.9:archivers/py-brotli@${PY_FLAVOR}
+SOCKS_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pysocks>=1.5.6<2.0:net/py-pysocks@${PY_FLAVOR}
+SSL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}certifi>=0:security/py-certifi@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}idna>=2.0.0:dns/py-idna@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}openssl>=0.14:security/py-openssl@${PY_FLAVOR}
+SSL_USE= PYTHON=cryptography
+
+.include <bsd.port.mk>
diff --git a/net/py-urllib31/distinfo b/net/py-urllib31/distinfo
new file mode 100644
index 000000000000..5db8b2278da2
--- /dev/null
+++ b/net/py-urllib31/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1725560881
+SHA256 (urllib3-1.26.20.tar.gz) = 40c2dc0c681e47eb8f90e7e27bf6ff7df2e677421fd46756da1161c39ca70d32
+SIZE (urllib3-1.26.20.tar.gz) = 307380
diff --git a/net/py-urllib31/files/patch-setup.cfg b/net/py-urllib31/files/patch-setup.cfg
new file mode 100644
index 000000000000..8e92a5d7e5b8
--- /dev/null
+++ b/net/py-urllib31/files/patch-setup.cfg
@@ -0,0 +1,11 @@
+--- setup.cfg.orig 2024-08-29 15:36:43 UTC
++++ setup.cfg
+@@ -7,7 +7,7 @@ universal = 1
+ universal = 1
+
+ [metadata]
+-license_file = LICENSE.txt
++license_files = LICENSE.txt
+ provides_extra =
+ secure
+ socks
diff --git a/net/py-urllib31/files/pkg-message.in b/net/py-urllib31/files/pkg-message.in
new file mode 100644
index 000000000000..4aa5b9e1f1d9
--- /dev/null
+++ b/net/py-urllib31/files/pkg-message.in
@@ -0,0 +1,21 @@
+[
+{
+ message: <<EOM
+Since version 1.25 HTTPS connections are now verified by default which is done
+via "cert_reqs = 'CERT_REQUIRED'". While certificate verification can be
+disabled via "cert_reqs = 'CERT_NONE'", it's highly recommended to leave it on.
+
+Various consumers of net/py-urllib3 already have implemented routines that
+either explicitly enable or disable HTTPS certificate verification (e.g. via
+configuration settings, CLI arguments, etc.).
+
+Yet it may happen that there are still some consumers which don't explicitly
+enable/disable certificate verification for HTTPS connections which could then
+lead to errors (as is often the case with self-signed certificates).
+
+In case of an error one should try first to temporarily disable certificate
+verification of the problematic urllib3 consumer to see if that approach will
+remedy the issue.
+EOM
+}
+]
diff --git a/net/py-urllib31/pkg-descr b/net/py-urllib31/pkg-descr
new file mode 100644
index 000000000000..c6003d7494ba
--- /dev/null
+++ b/net/py-urllib31/pkg-descr
@@ -0,0 +1,11 @@
+urllib3 is a powerful, sanity-friendly HTTP client for Python. Much of the
+Python ecosystem already uses urllib3 and you should too. urllib3 brings many
+critical features that are missing from the Python standard libraries:
+- Thread safety.
+- Connection pooling.
+- Client-side SSL/TLS verification.
+- File uploads with multipart encoding.
+- Helpers for retrying requests and dealing with HTTP redirects.
+- Support for gzip and deflate encoding.
+- Proxy support for HTTP and SOCKS.
+- 100% test coverage.