Accepting request 1184942 from devel:languages:python
- add netloc-tests.patch to skip failing test with python 3.12 changelog and https://bugs.python.org/issue42967. OBS-URL: https://build.opensuse.org/request/show/1184942 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-furl?expand=0&rev=11
This commit is contained in:
commit
a6dabe145e
@ -9,10 +9,10 @@ Subject: [PATCH] Use ipaddress to detect valid and invalid IPs
|
||||
tests/test_furl.py | 21 +++++++++++----------
|
||||
3 files changed, 50 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/furl/furl.py b/furl/furl.py
|
||||
index cd6d710..451767f 100644
|
||||
--- a/furl/furl.py
|
||||
+++ b/furl/furl.py
|
||||
Index: furl-2.1.3/furl/furl.py
|
||||
===================================================================
|
||||
--- furl-2.1.3.orig/furl/furl.py
|
||||
+++ furl-2.1.3/furl/furl.py
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
import re
|
||||
@ -59,7 +59,7 @@ index cd6d710..451767f 100644
|
||||
def get_scheme(url):
|
||||
if url.startswith(':'):
|
||||
return ''
|
||||
@@ -1434,15 +1466,12 @@ def host(self, host):
|
||||
@@ -1434,15 +1466,12 @@ class furl(URLPathCompositionInterface,
|
||||
"""
|
||||
Raises: ValueError on invalid host or malformed IPv6 address.
|
||||
"""
|
||||
@ -81,11 +81,11 @@ index cd6d710..451767f 100644
|
||||
errmsg = (
|
||||
"Invalid host '%s'. Host strings must have at least one "
|
||||
"non-period character, can't contain any of '%s', and can't "
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 8322619..887ca2e 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -114,6 +114,7 @@ def run_tests(self):
|
||||
Index: furl-2.1.3/setup.py
|
||||
===================================================================
|
||||
--- furl-2.1.3.orig/setup.py
|
||||
+++ furl-2.1.3/setup.py
|
||||
@@ -109,6 +109,7 @@ setup(
|
||||
install_requires=[
|
||||
'six>=1.8.0',
|
||||
'orderedmultidict>=1.0.1',
|
||||
@ -93,11 +93,11 @@ index 8322619..887ca2e 100644
|
||||
],
|
||||
cmdclass={
|
||||
'test': RunTests,
|
||||
diff --git a/tests/test_furl.py b/tests/test_furl.py
|
||||
index bc268c8..5666be7 100644
|
||||
--- a/tests/test_furl.py
|
||||
+++ b/tests/test_furl.py
|
||||
@@ -1655,10 +1655,10 @@ def test_hosts(self):
|
||||
Index: furl-2.1.3/tests/test_furl.py
|
||||
===================================================================
|
||||
--- furl-2.1.3.orig/tests/test_furl.py
|
||||
+++ furl-2.1.3/tests/test_furl.py
|
||||
@@ -1666,10 +1666,10 @@ class TestFurl(unittest.TestCase):
|
||||
# addresses.
|
||||
f = furl.furl('http://1.2.3.4.5.6/')
|
||||
|
||||
@ -112,7 +112,7 @@ index bc268c8..5666be7 100644
|
||||
|
||||
# Malformed IPv6 should raise an exception because urlparse.urlsplit()
|
||||
# raises an exception on malformed IPv6 addresses.
|
||||
@@ -1684,12 +1684,17 @@ def test_netloc(self):
|
||||
@@ -1695,12 +1695,17 @@ class TestFurl(unittest.TestCase):
|
||||
assert f.host == '1.2.3.4.5.6'
|
||||
assert f.port == 999
|
||||
|
||||
@ -132,7 +132,7 @@ index bc268c8..5666be7 100644
|
||||
# Malformed IPv6 should raise an exception because
|
||||
# urlparse.urlsplit() raises an exception
|
||||
with self.assertRaises(ValueError):
|
||||
@@ -1703,10 +1708,6 @@ def test_netloc(self):
|
||||
@@ -1714,10 +1719,6 @@ class TestFurl(unittest.TestCase):
|
||||
with self.assertRaises(ValueError):
|
||||
f.netloc = 'pump2pump.org:777777777777'
|
||||
|
||||
|
22
netloc-tests.patch
Normal file
22
netloc-tests.patch
Normal file
@ -0,0 +1,22 @@
|
||||
Index: furl-2.1.3/tests/test_furl.py
|
||||
===================================================================
|
||||
--- furl-2.1.3.orig/tests/test_furl.py
|
||||
+++ furl-2.1.3/tests/test_furl.py
|
||||
@@ -1635,11 +1635,12 @@ class TestFurl(unittest.TestCase):
|
||||
f.port = None
|
||||
assert f.url == '' and f.netloc is None
|
||||
|
||||
- # urlparse.urlsplit() treats the first two '//' as the beginning
|
||||
- # of a netloc, even if the netloc is empty.
|
||||
- f = furl.furl('////path')
|
||||
- assert f.netloc == '' and str(f.path) == '//path'
|
||||
- assert f.url == '////path'
|
||||
+ if sys.version_info < (3, 12):
|
||||
+ # urlparse.urlsplit() treats the first two '//' as the beginning
|
||||
+ # of a netloc, even if the netloc is empty.
|
||||
+ f = furl.furl('////path')
|
||||
+ assert f.netloc == '' and str(f.path) == '//path'
|
||||
+ assert f.url == '////path'
|
||||
|
||||
# TODO(grun): Test more odd URLs.
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 2 20:29:03 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- add netloc-tests.patch to skip failing test with python 3.12
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 4 22:28:07 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
@ -14,7 +19,7 @@ Wed Sep 28 19:47:43 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
||||
|
||||
- version update to v2.1.3
|
||||
Fixed: Actually drop ';' as a query delimiter. See furl v2.1.2's
|
||||
changelog and https://bugs.python.org/issue42967.
|
||||
changelog and https://bugs.python.org/issue42967.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 19 16:28:12 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-furl
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -29,6 +29,7 @@ Source: https://files.pythonhosted.org/packages/source/f/furl/furl-%{ver
|
||||
# PATCH-FIX-UPSTREAM 165-use-ipaddress-library.patch gh#gruns/furl#164 mcepl@suse.com
|
||||
# use ipaddress to parse IP addresses
|
||||
Patch0: 165-use-ipaddress-library.patch
|
||||
Patch1: netloc-tests.patch
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
|
Loading…
x
Reference in New Issue
Block a user