diff --git a/CherryPy-18.1.1.tar.gz b/CherryPy-18.1.1.tar.gz deleted file mode 100644 index f28732a..0000000 --- a/CherryPy-18.1.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6585c19b5e4faffa3613b5bf02c6a27dcc4c69a30d302aba819639a2af6fa48b -size 683044 diff --git a/CherryPy-18.1.2.tar.gz b/CherryPy-18.1.2.tar.gz new file mode 100644 index 0000000..bff01f2 --- /dev/null +++ b/CherryPy-18.1.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48de31ba3db04c5354a0fcf8acf21a9c5190380013afca746d50237c9ebe70f0 +size 683411 diff --git a/pytest5.patch b/pytest5.patch new file mode 100644 index 0000000..0ce37e6 --- /dev/null +++ b/pytest5.patch @@ -0,0 +1,63 @@ +From 96b34dfea7853b0189bc0a3878b6ddff0d4e505c Mon Sep 17 00:00:00 2001 +From: Sviatoslav Sydorenko +Date: Wed, 3 Jul 2019 11:59:52 +0200 +Subject: [PATCH] Fix test_invalid_status to work with pytest 5 + +Ref: https://github.com/cherrypy/cherrypy/pull/1791#issuecomment-508026879 +--- + cherrypy/test/test_httputil.py | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/cherrypy/test/test_httputil.py b/cherrypy/test/test_httputil.py +index fe6a3f41..c6b858b8 100644 +--- a/cherrypy/test/test_httputil.py ++++ b/cherrypy/test/test_httputil.py +@@ -74,7 +74,5 @@ def test_valid_status(status, expected_status): + ) + def test_invalid_status(status_code, error_msg): + """Check that invalid status cause certain errors.""" +- with pytest.raises(ValueError) as excinfo: ++ with pytest.raises(ValueError, match=error_msg): + httputil.valid_status(status_code) +- +- assert error_msg in str(excinfo) +From 14c12d2420a4b3765bb241250bd186e93b2f25eb Mon Sep 17 00:00:00 2001 +From: Sviatoslav Sydorenko +Date: Wed, 3 Jul 2019 14:04:02 +0200 +Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=E2=9C=85=20Fix=20pattern=20matchin?= + =?UTF-8?q?g=20in=20test=5Finvalid=5Fstatus?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + cherrypy/test/test_httputil.py | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +diff --git a/cherrypy/test/test_httputil.py b/cherrypy/test/test_httputil.py +index c6b858b8..84661424 100644 +--- a/cherrypy/test/test_httputil.py ++++ b/cherrypy/test/test_httputil.py +@@ -62,14 +62,17 @@ def test_valid_status(status, expected_status): + @pytest.mark.parametrize( + 'status_code,error_msg', + [ +- ('hey', "Illegal response status from server ('hey' is non-numeric)."), ++ ( ++ 'hey', ++ r"Illegal response status from server \('hey' is non-numeric\)." ++ ), + ( + {'hey': 'hi'}, +- 'Illegal response status from server ' +- "({'hey': 'hi'} is non-numeric).", ++ r'Illegal response status from server ' ++ r"\(\{'hey': 'hi'\} is non-numeric\).", + ), +- (1, 'Illegal response status from server (1 is out of range).'), +- (600, 'Illegal response status from server (600 is out of range).'), ++ (1, r'Illegal response status from server \(1 is out of range\).'), ++ (600, r'Illegal response status from server \(600 is out of range\).'), + ] + ) + def test_invalid_status(status_code, error_msg): diff --git a/python-CherryPy.changes b/python-CherryPy.changes index c73fd78..e00f176 100644 --- a/python-CherryPy.changes +++ b/python-CherryPy.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Fri Jul 19 12:13:03 UTC 2019 - Tomáš Chvátal + +- Add patch to work with pytest5, from upstream: + * pytest5.patch + +------------------------------------------------------------------- +Fri Jul 19 12:06:57 UTC 2019 - Tomáš Chvátal + +- Update to 18.1.2: + * Fixed :issue:`1377` via :pr:`1785`: Restore a native WSGI-less HTTP server support. + * :pr:`1769`: Reduce log level for non-error events in win32.py + ------------------------------------------------------------------- Fri May 31 15:32:40 CEST 2019 - Matej Cepl diff --git a/python-CherryPy.spec b/python-CherryPy.spec index f439738..4d66c92 100644 --- a/python-CherryPy.spec +++ b/python-CherryPy.spec @@ -19,13 +19,14 @@ %define skip_python2 1 %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-CherryPy -Version: 18.1.1 +Version: 18.1.2 Release: 0 Summary: Object-Oriented HTTP framework License: BSD-3-Clause Group: Development/Languages/Python URL: http://www.cherrypy.org Source: https://files.pythonhosted.org/packages/source/C/CherryPy/CherryPy-%{version}.tar.gz +Patch0: pytest5.patch BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -69,6 +70,7 @@ Oh, and most importantly: CherryPy is fun to work with :-) %prep %setup -q -n CherryPy-%{version} +%patch0 -p1 # do not require cov/xdist/etc sed -i -e '/addopts/d' pytest.ini