Files
Alexandru Ardelean 646903fea2 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>
2026-04-02 19:23:54 +03:00

34 lines
755 B
Bash

#!/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