Accepting request 874649 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/874649
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-furl?expand=0&rev=4
This commit is contained in:
Richard Brown 2021-03-02 13:42:59 +00:00 committed by Git OBS Bridge
commit 5c8594bb26
3 changed files with 41 additions and 4 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Feb 23 16:19:20 UTC 2021 - Matej Cepl <mcepl@suse.com>
- 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

View File

@ -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

View File

@ -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&amp=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&amp=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)