From 68085651c79fe03b07f55a37142d0468d4e8b0e4eb451eb2bff3be8c04e83d11 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 30 Mar 2021 10:19:42 +0000 Subject: [PATCH] Accepting request 882075 from home:bnavigator:branches:devel:languages:python - Add furl-py39-join.patch to fix Python 3.9 test failure gh#gruns/furl#139 - Submitted tests_overcome_bpo42967.patch as gh#gruns/furl#140 OBS-URL: https://build.opensuse.org/request/show/882075 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-furl?expand=0&rev=10 --- furl-py39-join.patch | 28 ++++++++++++++++++++++++++++ python-furl.changes | 7 +++++++ python-furl.spec | 12 +++++++++--- 3 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 furl-py39-join.patch diff --git a/furl-py39-join.patch b/furl-py39-join.patch new file mode 100644 index 0000000..5c9f2ec --- /dev/null +++ b/furl-py39-join.patch @@ -0,0 +1,28 @@ +Index: furl-2.1.0/tests/test_furl.py +=================================================================== +--- furl-2.1.0.orig/tests/test_furl.py ++++ furl-2.1.0/tests/test_furl.py +@@ -14,6 +14,7 @@ from __future__ import division + + import warnings + from abc import ABCMeta, abstractmethod ++import sys + + import six + from six.moves import zip +@@ -2037,9 +2038,13 @@ class TestFurl(unittest.TestCase): + assert f.url == 'http://pepp.ru/a/b/c#uwantpump?' + + # In edge cases (e.g. URLs without an authority/netloc), behave +- # identically to urllib.parse.urljoin(). ++ # identically to urllib.parse.urljoin(), which changed behavior ++ # in Python 3.9 + f = furl.furl('wss://slrp.com/').join('foo:1') +- assert f.url == 'wss://slrp.com/foo:1' ++ if sys.version_info[:2] < (3, 9): ++ assert f.url == 'wss://slrp.com/foo:1' ++ else: ++ assert f.url == 'foo:1' + f = furl.furl('wss://slrp.com/').join('foo:1:rip') + assert f.url == 'foo:1:rip' + f = furl.furl('scheme:path').join('foo:blah') diff --git a/python-furl.changes b/python-furl.changes index 8b540ec..ac533a8 100644 --- a/python-furl.changes +++ b/python-furl.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Mar 29 22:10:03 UTC 2021 - Ben Greiner + +- Add furl-py39-join.patch to fix Python 3.9 test failure + gh#gruns/furl#139 +- Submitted tests_overcome_bpo42967.patch as gh#gruns/furl#140 + ------------------------------------------------------------------- Tue Feb 23 16:19:20 UTC 2021 - Matej Cepl diff --git a/python-furl.spec b/python-furl.spec index ab75997..22e7190 100644 --- a/python-furl.spec +++ b/python-furl.spec @@ -29,6 +29,8 @@ Source: https://files.pythonhosted.org/packages/source/f/furl/furl-%{ver # With fix for bpo#42967, it is not possible to separate # parameters of URL query with semicolon Patch0: tests_overcome_bpo42967.patch +# PATCH-FIX-UPSTREAM furl-py39-join.patch -- gh#gruns/furl#139 +Patch1: furl-py39-join.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -56,14 +58,18 @@ chmod -x *.md %install %python_install -%python_expand %fdupes %{buildroot}%{$python_sitelib} +%{python_expand # +chmod -x %{buildroot}%{$python_sitelib}/furl-%{version}*-info/* +%fdupes %{buildroot}%{$python_sitelib} +} %check -%pytest -vv +%pytest %files %{python_files} %doc README.md %license LICENSE.md -%{python_sitelib}/* +%{python_sitelib}/furl +%{python_sitelib}/furl-%{version}*-info %changelog