forked from pool/python-CherryPy
- Update to 18.2.0:
* File-based sessions no longer attempt to remove the lock files when releasing locks, instead deferring to the default behavior of zc.lockfile. Fixes :issue:`1391` and :issue:`1779`. * Add native support for 308 Permanent Redirect usable via raise cherrypy.HTTPRedirect('/new_uri', 308). - Drop merged patch pytest5.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-CherryPy?expand=0&rev=32
This commit is contained in:
committed by
Git OBS Bridge
parent
a039ff30bc
commit
118c202f01
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:48de31ba3db04c5354a0fcf8acf21a9c5190380013afca746d50237c9ebe70f0
|
|
||||||
size 683411
|
|
3
CherryPy-18.2.0.tar.gz
Normal file
3
CherryPy-18.2.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:16fc226a280cd772ede7c309d3964002196784ac6615d8bface52be12ff51230
|
||||||
|
size 684947
|
@@ -1,63 +0,0 @@
|
|||||||
From 96b34dfea7853b0189bc0a3878b6ddff0d4e505c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Sviatoslav Sydorenko <wk@sydorenko.org.ua>
|
|
||||||
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 <wk@sydorenko.org.ua>
|
|
||||||
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):
|
|
@@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 24 08:49:15 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Update to 18.2.0:
|
||||||
|
* File-based sessions no longer attempt to remove the lock files
|
||||||
|
when releasing locks, instead deferring to the default behavior
|
||||||
|
of zc.lockfile. Fixes :issue:`1391` and :issue:`1779`.
|
||||||
|
* Add native support for 308 Permanent Redirect usable via raise
|
||||||
|
cherrypy.HTTPRedirect('/new_uri', 308).
|
||||||
|
- Drop merged patch pytest5.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jul 19 12:13:03 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
Fri Jul 19 12:13:03 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
@@ -19,14 +19,13 @@
|
|||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-CherryPy
|
Name: python-CherryPy
|
||||||
Version: 18.1.2
|
Version: 18.2.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Object-Oriented HTTP framework
|
Summary: Object-Oriented HTTP framework
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: http://www.cherrypy.org
|
URL: http://www.cherrypy.org
|
||||||
Source: https://files.pythonhosted.org/packages/source/C/CherryPy/CherryPy-%{version}.tar.gz
|
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_scm}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@@ -70,7 +69,6 @@ Oh, and most importantly: CherryPy is fun to work with :-)
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n CherryPy-%{version}
|
%setup -q -n CherryPy-%{version}
|
||||||
%patch0 -p1
|
|
||||||
# do not require cov/xdist/etc
|
# do not require cov/xdist/etc
|
||||||
sed -i -e '/addopts/d' pytest.ini
|
sed -i -e '/addopts/d' pytest.ini
|
||||||
|
|
||||||
@@ -79,12 +77,12 @@ sed -i -e '/addopts/d' pytest.ini
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%python_install
|
||||||
|
%python_expand rm -r %{buildroot}%{$python_sitelib}/cherrypy/test
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
%python_clone -a %{buildroot}%{_bindir}/cherryd
|
%python_clone -a %{buildroot}%{_bindir}/cherryd
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# gh#cherrypy/cherrypy#1781
|
%pytest -k 'not test_null_bytes'
|
||||||
%pytest -k 'not (test_wait_publishes_periodically or test_null_bytes)'
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%python_install_alternative cherryd
|
%python_install_alternative cherryd
|
||||||
|
Reference in New Issue
Block a user