Skip to content

Commit d39f792

Browse files
committed
test_url.py: handle 3.9 and 3.10 for http://[2a01:5cc0:1:2:3:4] testcase
The fix for python/cpython#103848 / CVE-2024-11168 also got backported to 3.9.21 and 3.10.16, so we cannot add that testcase for these versions either.
1 parent 2a3c000 commit d39f792

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test_url.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,11 @@ def test_safe_url_string_encoding(
420420
# (%) are not escaped.
421421
f"a://example.com#{FRAGMENT_TO_ENCODE}",
422422
}
423-
if sys.version_info < (3, 11, 4):
423+
if (
424+
sys.version_info < (3, 9, 21)
425+
or (sys.version_info[:2] == (3, 10) and sys.version_info < (3, 10, 16))
426+
or (sys.version_info[:2] == (1, 10) and sys.version_info < (3, 11, 4))
427+
):
424428
KNOWN_SAFE_URL_STRING_URL_ISSUES.add("http://[2a01:5cc0:1:2:3:4]") # Invalid IPv6
425429

426430

0 commit comments

Comments
 (0)