diff --git a/do-not-add-invalid-ipv6.patch b/do-not-add-invalid-ipv6.patch new file mode 100644 index 0000000..119c0b6 --- /dev/null +++ b/do-not-add-invalid-ipv6.patch @@ -0,0 +1,16 @@ +Index: w3lib-2.2.1/tests/test_url.py +=================================================================== +--- w3lib-2.2.1.orig/tests/test_url.py ++++ w3lib-2.2.1/tests/test_url.py +@@ -420,8 +420,9 @@ KNOWN_SAFE_URL_STRING_URL_ISSUES = { + # (%) are not escaped. + f"a://example.com#{FRAGMENT_TO_ENCODE}", + } +-if sys.version_info < (3, 11, 4): +- KNOWN_SAFE_URL_STRING_URL_ISSUES.add("http://[2a01:5cc0:1:2:3:4]") # Invalid IPv6 ++# openSUSE: All of our Python 3.10+ interpreters will fail this ++#if sys.version_info < (3, 11, 4): ++# KNOWN_SAFE_URL_STRING_URL_ISSUES.add("http://[2a01:5cc0:1:2:3:4]") # Invalid IPv6 + + + @pytest.mark.parametrize( diff --git a/python-w3lib.changes b/python-w3lib.changes index 78c4550..37fa0cc 100644 --- a/python-w3lib.changes +++ b/python-w3lib.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Nov 26 03:01:17 UTC 2024 - Steve Kowalik + +- Add patch do-not-add-invalid-ipv6.patch: + * Do not check invalid IPv6 addresses. + ------------------------------------------------------------------- Thu Jun 13 15:36:49 UTC 2024 - Dirk Müller diff --git a/python-w3lib.spec b/python-w3lib.spec index 80fc441..47f7efa 100644 --- a/python-w3lib.spec +++ b/python-w3lib.spec @@ -22,9 +22,10 @@ Version: 2.2.1 Release: 0 Summary: Library of Web-Related Functions License: BSD-3-Clause -Group: Development/Languages/Python URL: https://github.com/scrapy/w3lib Source: https://files.pythonhosted.org/packages/source/w/w3lib/w3lib-%{version}.tar.gz +# PATCH-FIX-OPENSUSE Do not check invalid IPv6 addresses +Patch0: do-not-add-invalid-ipv6.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools}