From 79ee6ef2125e55908a56150e93d1a6dcfa3c8b04 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Tue, 7 Jan 2020 18:19:15 +0100 Subject: [PATCH] New upstream version 0.16.0 (#1690599) --- .gitignore | 1 + 1293.patch | 37 ------------------------------------- 1455.patch | 24 ------------------------ python-werkzeug.spec | 38 ++++++++++++-------------------------- python38.patch | 27 --------------------------- sources | 3 +-- 6 files changed, 14 insertions(+), 116 deletions(-) delete mode 100644 1293.patch delete mode 100644 1455.patch delete mode 100644 python38.patch diff --git a/.gitignore b/.gitignore index 78bcaf2..707daf4 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ Werkzeug-0.6.2.tar.gz /Werkzeug-0.11.10.tar.gz /Werkzeug-0.12.2.tar.gz /Werkzeug-0.14.1.tar.gz +/Werkzeug-0.16.0.tar.gz diff --git a/1293.patch b/1293.patch deleted file mode 100644 index 9c35261..0000000 --- a/1293.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 989e13e0514a97cd01234233dd85ebbd2805a3bb Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Wed, 9 May 2018 15:50:50 -0700 -Subject: [PATCH] Skip tests that use 'xprocess' fixture when not installed - -There's already a little trick to skip tests that use a fixture -called 'subprocess' when pytest-xprocess is not installed, but -many tests use the 'xprocess' fixture directly, and all of those -will still just fail. This just defines a dummy 'xprocess' -fixture as well as the dummy 'subprocess' fixture when xprocess -is not installed, so those tests as well will be skipped instead -of failing. - -I noticed this when trying to run the test suite during build -of the Fedora package - xprocess isn't packaged for Fedora yet, -so there's no way to run the tests that use it unfortunately. - -Signed-off-by: Adam Williamson ---- - tests/conftest.py | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/tests/conftest.py b/tests/conftest.py -index ce885777a..f4611d9d0 100644 ---- a/tests/conftest.py -+++ b/tests/conftest.py -@@ -29,6 +29,10 @@ - @pytest.fixture(scope='session') - def subprocess(): - pytest.skip('pytest-xprocess not installed.') -+ -+ @pytest.fixture(scope='session') -+ def xprocess(): -+ pytest.skip('pytest-xprocess not installed.') - else: - @pytest.fixture(scope='session') - def subprocess(xprocess): diff --git a/1455.patch b/1455.patch deleted file mode 100644 index 48c2a95..0000000 --- a/1455.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 1cfdcf9824cb20e362979e8f7734012926492165 Mon Sep 17 00:00:00 2001 -From: Petr Viktorin -Date: Tue, 5 Feb 2019 13:50:43 +0100 -Subject: [PATCH] test_serving: Use sys.executable, not 'python' - -This test failed on systems where the Python command is not called "python". -Also, it could execute Python 2 when pytest is run under py3, or vice versa. ---- - tests/test_serving.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/test_serving.py b/tests/test_serving.py -index 428af7319..a6a05d4f6 100644 ---- a/tests/test_serving.py -+++ b/tests/test_serving.py -@@ -287,7 +287,7 @@ def sleep(secs): - from werkzeug._reloader import ReloaderLoop - ReloaderLoop()._sleep(0) - ''')) -- subprocess.check_call(['python', str(script)]) -+ subprocess.check_call([sys.executable, str(script)]) - - - def test_wrong_protocol(dev_server): diff --git a/python-werkzeug.spec b/python-werkzeug.spec index 8a5e440..52299c7 100644 --- a/python-werkzeug.spec +++ b/python-werkzeug.spec @@ -1,28 +1,13 @@ %global srcname Werkzeug Name: python-werkzeug -Version: 0.14.1 -Release: 12%{?dist} +Version: 0.16.0 +Release: 1%{?dist} Summary: The Swiss Army knife of Python web development License: BSD URL: http://werkzeug.pocoo.org/ Source0: https://files.pythonhosted.org/packages/source/W/Werkzeug/%{srcname}-%{version}.tar.gz -# Pypi version of werkzeug is missing _themes folder needed to build werkzeug sphinx docs -# See https://github.com/mitsuhiko/werkzeug/issues/761 -Source1: werkzeug-sphinx-theme.tar.gz - -# https://github.com/pallets/werkzeug/pull/1293 -# skip all tests that use xprocess when it's not installed (like here, -# as it's not packaged for Fedora...) -Patch0: 1293.patch - -# Use sys.executable in tests -Patch1: https://github.com/pallets/werkzeug/pull/1455.patch - -# Python 3.8 support in tests -# https://github.com/pallets/werkzeug/commit/e060800e8e6e0c611f9439d746bd4da99a314b79 -Patch2: python38.patch BuildArch: noarch @@ -60,6 +45,9 @@ BuildRequires: python3-pyOpenSSL BuildRequires: python3-greenlet BuildRequires: python3-redis BuildRequires: python3-memcached +# for docs +BuildRequires: python3-Pallets-Sphinx-Themes +BuildRequires: python3-sphinx-issues %{?python_provide:%python_provide python3-werkzeug} @@ -80,9 +68,7 @@ Documentation and examples for python3-werkzeug. %prep %autosetup -p1 -n %{srcname}-%{version} -%{__sed} -i 's/\r//' LICENSE %{__sed} -i '1d' tests/multipart/test_collect.py -tar -xf %{SOURCE1} find . -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' @@ -92,10 +78,7 @@ find . -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' find examples/ -name '*.py' -executable | xargs chmod -x find examples/ -name '*.png' -executable | xargs chmod -x pushd docs -# Add a symlink to the dir with the Python module so that __version__ can be -# obtained therefrom. -ln -s ../werkzeug werkzeug -make SPHINXBUILD=sphinx-build-3 html +make PYTHONPATH=../src/ SPHINXBUILD=sphinx-build-3 html popd @@ -105,11 +88,11 @@ popd %{__rm} -rf examples/cupoftee/db.pyc %check -PYTHONPATH=./ %{__python3} -m pytest +PYTHONPATH=./src/ %{__python3} -m pytest -k 'not test_windows_get_args_for_reloading' %files -n python3-werkzeug -%license LICENSE -%doc AUTHORS PKG-INFO CHANGES.rst +%license LICENSE.rst +%doc PKG-INFO CHANGES.rst %{python3_sitelib}/* %files -n python3-werkzeug-doc @@ -117,6 +100,9 @@ PYTHONPATH=./ %{__python3} -m pytest %changelog +* Tue Jan 07 2020 Lumír Balhar - 0.16.0-1 +- New upstream version 0.16.0 (#1690599) + * Wed Sep 18 2019 Miro Hrončok - 0.14.1-12 - Subpackage python2-werkzeug has been removed See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal diff --git a/python38.patch b/python38.patch deleted file mode 100644 index 788361c..0000000 --- a/python38.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/tests/test_utils.py b/tests/test_utils.py -index 0ead561..ba46887 100644 ---- a/tests/test_utils.py -+++ b/tests/test_utils.py -@@ -174,16 +174,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): diff --git a/sources b/sources index 384752d..6194e64 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (Werkzeug-0.14.1.tar.gz) = 64976cc46c1cee2203112c50aba6f9404d4e48d4a90f8b11837148b5415a28572b7e706095586045a46879e853fc5a80c63e7bf0c13eda29d564a37b4a554c0b -SHA512 (werkzeug-sphinx-theme.tar.gz) = f98e00447afb5d2ecba707fd336f139c0268b0fef1557fed9aa02274c9b8c29980fb3efa3a26d3a81340e920ccc9ea610f5c5a0eeab0cda900b400d56148b98d +SHA512 (Werkzeug-0.16.0.tar.gz) = cf36674621b9127824c2a1be60361f48138fd6dd80ae67feb450b5feef4177c57d0ffb1fe211bbd06e1689692547c32900abe468fb33e413b7b7c6e22af0463f