diff --git a/python-furl.changes b/python-furl.changes index b3c7224..8b540ec 100644 --- a/python-furl.changes +++ b/python-furl.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Feb 23 16:19:20 UTC 2021 - Matej Cepl + +- Switch testing to pytest, it is just more convenient to debug. +- Add tests_overcome_bpo42967.patch to overcome changes in Python + interpreter after fixing bpo#42967 (gh#gruns/furl#135). + ------------------------------------------------------------------- Thu Mar 5 12:33:35 UTC 2020 - pgajdos@suse.com diff --git a/python-furl.spec b/python-furl.spec index a2338f2..ab75997 100644 --- a/python-furl.spec +++ b/python-furl.spec @@ -1,7 +1,7 @@ # # spec file for package python-furl # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,6 +25,10 @@ License: Unlicense Group: Development/Languages/Python URL: https://github.com/gruns/furl Source: https://files.pythonhosted.org/packages/source/f/furl/furl-%{version}.tar.gz +# PATCH-FIX-UPSTREAM tests_overcome_bpo42967.patch gh#gruns/furl#135 mcepl@suse.com +# With fix for bpo#42967, it is not possible to separate +# parameters of URL query with semicolon +Patch0: tests_overcome_bpo42967.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -34,6 +38,7 @@ BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module flake8} BuildRequires: %{python_module orderedmultidict >= 1.0} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module six >= 1.8.0} # /SECTION %python_subpackages @@ -42,8 +47,9 @@ BuildRequires: %{python_module six >= 1.8.0} furl is a Python library for parsing and manipulating URLs. %prep -%setup -q -n furl-%{version} -chmod -x README.md +%autosetup -p1 -n furl-%{version} + +chmod -x *.md %build %python_build @@ -53,7 +59,7 @@ chmod -x README.md %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%python_exec setup.py test +%pytest -vv %files %{python_files} %doc README.md diff --git a/tests_overcome_bpo42967.patch b/tests_overcome_bpo42967.patch new file mode 100644 index 0000000..e53cad5 --- /dev/null +++ b/tests_overcome_bpo42967.patch @@ -0,0 +1,24 @@ +--- a/tests/test_furl.py ++++ b/tests/test_furl.py +@@ -602,17 +602,17 @@ class TestQuery(unittest.TestCase): + 'space=a+a&=a%26a', 'a a=a a&no encoding=sup', 'a+a=a+a', + 'a%20=a+a', 'a%20a=a%20a', 'a+a=a%20a', 'space=a a&=a^a', + 'a=a&s=s#s', '+=+', "/?:@-._~!$&'()*+,=/?:@-._~!$'()*+,=", +- 'a=a&c=c%5Ec', '<=>&^="', '%3C=%3E&%5E=%22', '%=%;`=`', ++ 'a=a&c=c%5Ec', '<=>&^="', '%3C=%3E&%5E=%22', '%=%&`=`', + '%25=%25&%60=%60', + # Only keys, no values. + 'asdfasdf', '/asdf/asdf/sdf', '*******', '!@#(*&@!#(*@!#', 'a&b', +- 'a;b', ++ 'a&b', + # Repeated parameters. + 'a=a&a=a', 'space=a+a&space=b+b', + # Empty keys and/or values. + '=', 'a=', 'a=a&a=', '=a&=b', +- # Semicolon delimiter, like 'a=a;b=b'. +- 'a=a;a=a', 'space=a+a;space=b+b', ++ # Semicolon delimiter is not allowed per default after bpo#42967 ++ 'a=a&a=a', 'space=a+a&space=b+b', + ])) + self.items = (self.itemlists + self.itemdicts + self.itemomdicts + + self.itemstrs)