#6 New upstream version 0.16.0 (#1690599)
Merged 4 years ago by churchyard. Opened 4 years ago by lbalhar.
rpms/ lbalhar/python-werkzeug master  into  master

file modified
+1
@@ -13,3 +13,4 @@ 

  /Werkzeug-0.11.10.tar.gz

  /Werkzeug-0.12.2.tar.gz

  /Werkzeug-0.14.1.tar.gz

+ /Werkzeug-0.16.0.tar.gz

file removed
-37
@@ -1,37 +0,0 @@ 

- From 989e13e0514a97cd01234233dd85ebbd2805a3bb Mon Sep 17 00:00:00 2001

- From: Adam Williamson <awilliam@redhat.com>

- 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 <awilliam@redhat.com>

- ---

-  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):

file removed
-24
@@ -1,24 +0,0 @@ 

- From 1cfdcf9824cb20e362979e8f7734012926492165 Mon Sep 17 00:00:00 2001

- From: Petr Viktorin <encukou@gmail.com>

- 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):

file modified
+12 -26
@@ -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-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 @@ 

  

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

  %{__rm} -rf examples/cupoftee/db.pyc

  

  %check

- PYTHONPATH=./ %{__python3} -m pytest

+ PYTHONPATH=./src/ pytest-3

  

  %files -n python3-werkzeug

- %license LICENSE

- %doc AUTHORS PKG-INFO CHANGES.rst

+ %license LICENSE.rst

+ %doc PKG-INFO CHANGES.rst

not related to this PR, but I have noticed the README is missing.

  %{python3_sitelib}/*

not related to this PR, but %{python3_sitelib}/* is forbidden in the guidelines.

  

  %files -n python3-werkzeug-doc
@@ -117,6 +100,9 @@ 

  

  

  %changelog

+ * Tue Jan 07 2020 Lumír Balhar <lbalhar@redhat.com> - 0.16.0-1

+ - New upstream version 0.16.0 (#1690599)

+ 

  * Wed Sep 18 2019 Miro Hrončok <mhroncok@redhat.com> - 0.14.1-12

  - Subpackage python2-werkzeug has been removed

    See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal

file removed
-27
@@ -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):

file modified
+1 -2
@@ -1,2 +1,1 @@ 

- SHA512 (Werkzeug-0.14.1.tar.gz) = 64976cc46c1cee2203112c50aba6f9404d4e48d4a90f8b11837148b5415a28572b7e706095586045a46879e853fc5a80c63e7bf0c13eda29d564a37b4a554c0b

- SHA512 (werkzeug-sphinx-theme.tar.gz) = f98e00447afb5d2ecba707fd336f139c0268b0fef1557fed9aa02274c9b8c29980fb3efa3a26d3a81340e920ccc9ea610f5c5a0eeab0cda900b400d56148b98d

+ SHA512 (Werkzeug-0.16.0.tar.gz) = cf36674621b9127824c2a1be60361f48138fd6dd80ae67feb450b5feef4177c57d0ffb1fe211bbd06e1689692547c32900abe468fb33e413b7b7c6e22af0463f

Scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=40239063
It builds and installs, that's all I can say.

There is one new skipped test but it's testing some windows functionality and does monkey patching of Python internals like sys and os modules. I'll try to create a reproducer and report it upstream then. At the first look, it seems to be a problem with how tests are executed.

It might not be perfect, but it's fast.

1 new commit added

  • fixup! New upstream version 0.16.0 (#1690599)
4 years ago

The fixup has no impact on the resulting rpm, will proceed with the tests in copr as is.

Fixup commit enables the problematic test back. Tests have to be executed with pytest directly. I'll report it upstream.

not related to this PR, but I have noticed the README is missing.

not related to this PR, but %{python3_sitelib}/* is forbidden in the guidelines.

All test builds schedule. I have skipped sagemath and pipenv, because they are enormous and sagemath doesn't have all deps in Fedora anyway, due to the Java situation.

Pull-Request has been merged by churchyard

4 years ago