python-urllib3: relax setuptools-scm version constraint
authorAlexandru Ardelean <redacted>
Wed, 1 Apr 2026 15:42:35 +0000 (18:42 +0300)
committerAlexandru Ardelean <redacted>
Thu, 2 Apr 2026 16:23:54 +0000 (19:23 +0300)
urllib3 2.6.3 pyproject.toml pins setuptools-scm<10 but
python-setuptools-scm was recently bumped to 10.0.3, breaking
the build. Drop the upper bound via patch to allow building
with setuptools-scm 10.x.

Also add test.sh to verify core API imports, Retry/Timeout
configuration, and PoolManager creation.

Signed-off-by: Alexandru Ardelean <redacted>
lang/python/python-urllib3/Makefile
lang/python/python-urllib3/patches/0001-relax-setuptools-scm-version-constraint.patch [new file with mode: 0644]
lang/python/python-urllib3/test.sh [new file with mode: 0644]

index c4a3a0211d8dd2abf0ef7fafc7eced683d64061c..25d92fe5c438e26e7d531397c7a2d62bdb6b161e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-urllib3
 PKG_VERSION:=2.6.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
 PKG_LICENSE:=MIT
diff --git a/lang/python/python-urllib3/patches/0001-relax-setuptools-scm-version-constraint.patch b/lang/python/python-urllib3/patches/0001-relax-setuptools-scm-version-constraint.patch
new file mode 100644 (file)
index 0000000..d3791ef
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -1,7 +1,7 @@
+ # This file is protected via CODEOWNERS
+ [build-system]
+-requires = ["hatchling>=1.27.0,<2", "hatch-vcs>=0.4.0,<0.6.0", "setuptools-scm>=8,<10"]
++requires = ["hatchling>=1.27.0,<2", "hatch-vcs>=0.4.0,<0.6.0", "setuptools-scm>=8"]
+ build-backend = "hatchling.build"
+ [project]
diff --git a/lang/python/python-urllib3/test.sh b/lang/python/python-urllib3/test.sh
new file mode 100644 (file)
index 0000000..31237f3
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+[ "$1" = python3-urllib3 ] || exit 0
+
+python3 - << 'EOF'
+import urllib3
+
+# Verify version
+assert urllib3.__version__
+
+# Verify core classes are importable
+from urllib3 import HTTPConnectionPool, HTTPSConnectionPool, PoolManager
+from urllib3.util.retry import Retry
+from urllib3.util.timeout import Timeout
+from urllib3.exceptions import (
+    MaxRetryError, TimeoutError, HTTPError,
+    NewConnectionError, DecodeError
+)
+
+# Test Retry configuration
+retry = Retry(total=3, backoff_factor=0.5)
+assert retry.total == 3
+
+# Test Timeout configuration
+timeout = Timeout(connect=5.0, read=10.0)
+assert timeout.connect_timeout == 5.0
+
+# Test PoolManager creation
+pm = PoolManager(num_pools=5, maxsize=10)
+assert pm is not None
+
+print("urllib3 OK")
+EOF
git clone https://git.99rst.org/PROJECT