diff --git a/python-werkzeug.spec b/python-werkzeug.spec index 456650451fff1bb734fd320339ee8d7d7261f3d0..8ecc732ee0be6c5261e45f61bd435dbfe1b5742b 100644 --- a/python-werkzeug.spec +++ b/python-werkzeug.spec @@ -4,7 +4,7 @@ Name: python-werkzeug Summary: A comprehensive WSGI web application library Version: 0.14.1 -Release: 6 +Release: 7 License: BSD URL: http://werkzeug.pocoo.org/ Source0: https://files.pythonhosted.org/packages/source/W/Werkzeug/%{srcname}-%{version}.tar.gz @@ -14,6 +14,8 @@ Source1: https://github.com/pallets/werkzeug/archive/0.14.1.tar.gz # skip tests that use a fixture called 'subprocess' when pytest-xprocess # is not installed Patch0: Skip-tests-that-use-xprocess-fixture-when-not-installed.patch +# Fix test fail with python3.8 +Patch1: werkzeug-fix-tests-for-nightly-and-osx.patch %global _description\ Werkzeug is a comprehensive WSGI web application library. It began as a\ @@ -86,7 +88,7 @@ Documentation and examples for python3-werkzeug. %prep -%autosetup -n %{srcname}-%{version} -p1 -Sgit +%autosetup -n %{srcname}-%{version} -p1 %{__sed} -i 's/\r//' LICENSE %{__sed} -i '1d' tests/multipart/test_collect.py tar -xf %{SOURCE1} @@ -156,5 +158,8 @@ popd %changelog +* Wed Jun 24 2020 lingsheng - 0.14.1-5 +- Fix test fail with python3.8 + * Mon Nov 4 2019 openEuler Buildteam - 0.14.1-4 - Package init diff --git a/werkzeug-fix-tests-for-nightly-and-osx.patch b/werkzeug-fix-tests-for-nightly-and-osx.patch new file mode 100644 index 0000000000000000000000000000000000000000..3f2807226b8652689d53008a69f9f77178c4b371 --- /dev/null +++ b/werkzeug-fix-tests-for-nightly-and-osx.patch @@ -0,0 +1,36 @@ +From e060800e8e6e0c611f9439d746bd4da99a314b79 Mon Sep 17 00:00:00 2001 +From: David Lord +Date: Tue, 12 Feb 2019 08:32:59 -0800 +Subject: [PATCH] fix tests for nightly and osx + +--- + tests/test_utils.py | 12 ++++++------ + 1 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/tests/test_utils.py b/tests/test_utils.py +index 5a6a3f523..6de22b3d5 100644 +--- a/tests/test_utils.py ++++ b/tests/test_utils.py +@@ -161,16 +161,16 @@ def test_unescape(): + + + def test_import_string(): +- import cgi ++ from datetime import date + from werkzeug.debug import DebuggedApplication +- assert utils.import_string('cgi.escape') is cgi.escape +- assert utils.import_string(u'cgi.escape') is cgi.escape +- assert utils.import_string('cgi:escape') is cgi.escape ++ assert utils.import_string('datetime.date') is date ++ assert utils.import_string(u'datetime.date') is date ++ assert utils.import_string('datetime:date') is date + assert utils.import_string('XXXXXXXXXXXX', True) is None +- assert utils.import_string('cgi.XXXXXXXXXXXX', True) is None ++ assert utils.import_string('datetime.XXXXXXXXXXXX', True) is None + assert utils.import_string(u'werkzeug.debug.DebuggedApplication') is DebuggedApplication + pytest.raises(ImportError, utils.import_string, 'XXXXXXXXXXXXXXXX') +- pytest.raises(ImportError, utils.import_string, 'cgi.XXXXXXXXXX') ++ pytest.raises(ImportError, utils.import_string, 'datetime.XXXXXXXXXX') + + + def test_import_string_attribute_error(tmpdir, monkeypatch):