python-urllib3: relax setuptools-scm version constraint

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 <alex@shruggie.ro>
This commit is contained in:
Alexandru Ardelean
2026-04-01 18:42:35 +03:00
committed by Alexandru Ardelean
parent 184c4496eb
commit 646903fea2
3 changed files with 45 additions and 1 deletions

View 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

View File

@@ -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]

View File

@@ -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