From 646903fea2c9cb6d5e46f9de9721e2b70d008c93 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Wed, 1 Apr 2026 18:42:35 +0300 Subject: [PATCH] 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 --- lang/python/python-urllib3/Makefile | 2 +- ...ax-setuptools-scm-version-constraint.patch | 11 +++++++ lang/python/python-urllib3/test.sh | 33 +++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 lang/python/python-urllib3/patches/0001-relax-setuptools-scm-version-constraint.patch create mode 100644 lang/python/python-urllib3/test.sh diff --git a/lang/python/python-urllib3/Makefile b/lang/python/python-urllib3/Makefile index c4a3a0211d..25d92fe5c4 100644 --- a/lang/python/python-urllib3/Makefile +++ b/lang/python/python-urllib3/Makefile @@ -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 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 index 0000000000..d3791ef8cc --- /dev/null +++ b/lang/python/python-urllib3/patches/0001-relax-setuptools-scm-version-constraint.patch @@ -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 index 0000000000..31237f35b5 --- /dev/null +++ b/lang/python/python-urllib3/test.sh @@ -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