From 61de100a64316174591fa9e77dc3e2fa5818ee4a1e78ab9672b2198aeda3f925 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 23 Feb 2021 16:42:07 +0000 Subject: [PATCH] Accepting request 874648 from home:mcepl:branches:python36 - 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). OBS-URL: https://build.opensuse.org/request/show/874648 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-furl?expand=0&rev=8 --- python-furl.changes | 7 +++++++ python-furl.spec | 14 ++++++++++---- tests_overcome_bpo42967.patch | 24 ++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 tests_overcome_bpo42967.patch 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)