Describe the bug
Since #1668 (commit 919d827), CI on main has been red. The four test_urllib3_* tests in xrspatial/geotiff/tests/test_ssrf_hardening_1664.py::TestRedirectRevalidation raise ModuleNotFoundError: No module named 'urllib3' on every OS / Python combo:
```
FAILED xrspatial/geotiff/tests/test_ssrf_hardening_1664.py::TestRedirectRevalidation::test_urllib3_redirect_to_private_rejected
FAILED xrspatial/geotiff/tests/test_ssrf_hardening_1664.py::TestRedirectRevalidation::test_urllib3_redirect_to_public_followed
FAILED xrspatial/geotiff/tests/test_ssrf_hardening_1664.py::TestRedirectRevalidation::test_urllib3_redirect_chain_capped
FAILED xrspatial/geotiff/tests/test_ssrf_hardening_1664.py::TestRedirectRevalidation::test_urllib3_relative_location_resolved
===== 4 failed, 4683 passed, 999 skipped =====
```
urllib3 is an optional runtime dependency (_HTTPSource falls back to stdlib urllib.request when urllib3 is missing — see _reader.py:615-617). The test class mocks urllib3's PoolManager API and calls src.read_range(...), which calls _urllib3_timeout() at _reader.py:640. That helper does a lazy import urllib3 and blows up when the package isn't installed.
Expected behavior
The four test_urllib3_* tests are specifically exercising the urllib3 path. They should skip cleanly when urllib3 is not installed.
Suggested fix
Add pytest.importorskip("urllib3") at the top of the TestRedirectRevalidation class. The stdlib-fallback path can be tested separately if needed.
Impact
Currently blocks CI on every PR that branches from main. PRs #1675-#1680 all hit this same wall.
Describe the bug
Since #1668 (commit 919d827), CI on
mainhas been red. The fourtest_urllib3_*tests inxrspatial/geotiff/tests/test_ssrf_hardening_1664.py::TestRedirectRevalidationraiseModuleNotFoundError: No module named 'urllib3'on every OS / Python combo:```
FAILED xrspatial/geotiff/tests/test_ssrf_hardening_1664.py::TestRedirectRevalidation::test_urllib3_redirect_to_private_rejected
FAILED xrspatial/geotiff/tests/test_ssrf_hardening_1664.py::TestRedirectRevalidation::test_urllib3_redirect_to_public_followed
FAILED xrspatial/geotiff/tests/test_ssrf_hardening_1664.py::TestRedirectRevalidation::test_urllib3_redirect_chain_capped
FAILED xrspatial/geotiff/tests/test_ssrf_hardening_1664.py::TestRedirectRevalidation::test_urllib3_relative_location_resolved
===== 4 failed, 4683 passed, 999 skipped =====
```
urllib3is an optional runtime dependency (_HTTPSourcefalls back to stdliburllib.requestwhen urllib3 is missing — see_reader.py:615-617). The test class mocks urllib3'sPoolManagerAPI and callssrc.read_range(...), which calls_urllib3_timeout()at_reader.py:640. That helper does a lazyimport urllib3and blows up when the package isn't installed.Expected behavior
The four
test_urllib3_*tests are specifically exercising the urllib3 path. They should skip cleanly when urllib3 is not installed.Suggested fix
Add
pytest.importorskip("urllib3")at the top of theTestRedirectRevalidationclass. The stdlib-fallback path can be tested separately if needed.Impact
Currently blocks CI on every PR that branches from
main. PRs #1675-#1680 all hit this same wall.