Hello community,
here is the log from the commit of package python-CherryPy for openSUSE:Factory
checked in at 2019-07-30 13:02:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-CherryPy (Old)
and /work/SRC/openSUSE:Factory/.python-CherryPy.new.4126 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-CherryPy"
Tue Jul 30 13:02:58 2019 rev:21 rq:717078 version:18.1.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-CherryPy/python-CherryPy.changes
2019-06-18 14:44:49.833738763 +0200
+++
/work/SRC/openSUSE:Factory/.python-CherryPy.new.4126/python-CherryPy.changes
2019-07-30 13:03:00.162419165 +0200
@@ -1,0 +2,13 @@
+Fri Jul 19 12:13:03 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Add patch to work with pytest5, from upstream:
+ * pytest5.patch
+
+-------------------------------------------------------------------
+Fri Jul 19 12:06:57 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- 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
+
+-------------------------------------------------------------------
Old:
----
CherryPy-18.1.1.tar.gz
New:
----
CherryPy-18.1.2.tar.gz
pytest5.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-CherryPy.spec ++++++
--- /var/tmp/diff_new_pack.Y9WIH0/_old 2019-07-30 13:03:00.998418997 +0200
+++ /var/tmp/diff_new_pack.Y9WIH0/_new 2019-07-30 13:03:00.998418997 +0200
@@ -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 @@
%prep
%setup -q -n CherryPy-%{version}
+%patch0 -p1
# do not require cov/xdist/etc
sed -i -e '/addopts/d' pytest.ini
++++++ CherryPy-18.1.1.tar.gz -> CherryPy-18.1.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.1.1/.pre-commit-config-pep257.yaml
new/CherryPy-18.1.2/.pre-commit-config-pep257.yaml
--- old/CherryPy-18.1.1/.pre-commit-config-pep257.yaml 2019-03-27
15:36:33.000000000 +0100
+++ new/CherryPy-18.1.2/.pre-commit-config-pep257.yaml 2019-06-23
17:26:59.000000000 +0200
@@ -1,5 +1,5 @@
repos:
- repo: git://github.com/chewse/pre-commit-mirrors-pydocstyle
- sha: v2.1.1
+ rev: v2.1.1
hooks:
- id: pydocstyle
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.1.1/.pre-commit-config.yaml
new/CherryPy-18.1.2/.pre-commit-config.yaml
--- old/CherryPy-18.1.1/.pre-commit-config.yaml 2019-03-27 15:36:33.000000000
+0100
+++ new/CherryPy-18.1.2/.pre-commit-config.yaml 2019-06-23 17:26:59.000000000
+0200
@@ -1,6 +1,6 @@
repos:
- repo: git://github.com/pre-commit/pre-commit-hooks
- sha: v1.1.1
+ rev: v1.1.1
hooks:
- id: trailing-whitespace
exclude: cherrypy/test/static/index.html
@@ -29,7 +29,7 @@
- id: requirements-txt-fixer
- repo: git://github.com/chewse/pre-commit-mirrors-pydocstyle
- sha: v2.1.1
+ rev: v2.1.1
hooks:
- id: pydocstyle
exclude: |
@@ -51,11 +51,11 @@
)
- repo: git://github.com/Lucas-C/pre-commit-hooks
- sha: v1.1.1
+ rev: v1.1.1
hooks:
- id: remove-tabs
- repo: git://github.com/Lucas-C/pre-commit-hooks-lxml
- sha: v1.0.2
+ rev: v1.0.2
hooks:
- id: forbid-html-img-without-alt-text
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.1.1/CHANGES.rst
new/CherryPy-18.1.2/CHANGES.rst
--- old/CherryPy-18.1.1/CHANGES.rst 2019-03-27 15:36:33.000000000 +0100
+++ new/CherryPy-18.1.2/CHANGES.rst 2019-06-23 17:26:59.000000000 +0200
@@ -1,3 +1,10 @@
+v18.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
+
v18.1.1
-------
@@ -25,6 +32,11 @@
remain an LTS release for bug and security fixes.
* Drop support for Python 3.4.
+v17.4.2 (unreleased)
+--------------------
+
+* Fixed :issue:`1377` by backporting :pr:`1785` via :pr:`1786`:
+ Restore a native WSGI-less HTTP server support.
v17.4.1
-------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.1.1/CherryPy.egg-info/PKG-INFO
new/CherryPy-18.1.2/CherryPy.egg-info/PKG-INFO
--- old/CherryPy-18.1.1/CherryPy.egg-info/PKG-INFO 2019-03-27
15:36:58.000000000 +0100
+++ new/CherryPy-18.1.2/CherryPy.egg-info/PKG-INFO 2019-06-23
17:27:23.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: CherryPy
-Version: 18.1.1
+Version: 18.1.2
Summary: Object-Oriented HTTP framework
Home-page: https://www.cherrypy.org
Author: CherryPy Team
@@ -140,10 +140,10 @@
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Server
Classifier: Topic :: Software Development :: Libraries :: Application
Frameworks
Requires-Python: >=3.5
-Provides-Extra: testing
-Provides-Extra: memcached_session
Provides-Extra: xcgi
Provides-Extra: ssl
-Provides-Extra: json
-Provides-Extra: docs
+Provides-Extra: testing
Provides-Extra: routes_dispatcher
+Provides-Extra: docs
+Provides-Extra: memcached_session
+Provides-Extra: json
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.1.1/PKG-INFO new/CherryPy-18.1.2/PKG-INFO
--- old/CherryPy-18.1.1/PKG-INFO 2019-03-27 15:36:58.000000000 +0100
+++ new/CherryPy-18.1.2/PKG-INFO 2019-06-23 17:27:23.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: CherryPy
-Version: 18.1.1
+Version: 18.1.2
Summary: Object-Oriented HTTP framework
Home-page: https://www.cherrypy.org
Author: CherryPy Team
@@ -140,10 +140,10 @@
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Server
Classifier: Topic :: Software Development :: Libraries :: Application
Frameworks
Requires-Python: >=3.5
-Provides-Extra: testing
-Provides-Extra: memcached_session
Provides-Extra: xcgi
Provides-Extra: ssl
-Provides-Extra: json
-Provides-Extra: docs
+Provides-Extra: testing
Provides-Extra: routes_dispatcher
+Provides-Extra: docs
+Provides-Extra: memcached_session
+Provides-Extra: json
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.1.1/cherrypy/_cpnative_server.py
new/CherryPy-18.1.2/cherrypy/_cpnative_server.py
--- old/CherryPy-18.1.1/cherrypy/_cpnative_server.py 2019-03-27
15:36:33.000000000 +0100
+++ new/CherryPy-18.1.2/cherrypy/_cpnative_server.py 2019-06-23
17:26:59.000000000 +0200
@@ -9,6 +9,7 @@
import cherrypy
from cherrypy._cperror import format_exc, bare_error
from cherrypy.lib import httputil
+from ._cpcompat import tonative
class NativeGateway(cheroot.server.Gateway):
@@ -21,21 +22,25 @@
req = self.req
try:
# Obtain a Request object from CherryPy
- local = req.server.bind_addr
+ local = req.server.bind_addr # FIXME: handle UNIX sockets
+ local = tonative(local[0]), local[1]
local = httputil.Host(local[0], local[1], '')
- remote = req.conn.remote_addr, req.conn.remote_port
+ remote = tonative(req.conn.remote_addr), req.conn.remote_port
remote = httputil.Host(remote[0], remote[1], '')
- scheme = req.scheme
- sn = cherrypy.tree.script_name(req.uri or '/')
+ scheme = tonative(req.scheme)
+ sn = cherrypy.tree.script_name(tonative(req.uri or '/'))
if sn is None:
self.send_response('404 Not Found', [], [''])
else:
app = cherrypy.tree.apps[sn]
- method = req.method
- path = req.path
- qs = req.qs or ''
- headers = req.inheaders.items()
+ method = tonative(req.method)
+ path = tonative(req.path)
+ qs = tonative(req.qs or '')
+ headers = (
+ (tonative(h), tonative(v))
+ for h, v in req.inheaders.items()
+ )
rfile = req.rfile
prev = None
@@ -52,8 +57,11 @@
# Run the CherryPy Request object and obtain the
# response
try:
- request.run(method, path, qs,
- req.request_protocol, headers, rfile)
+ request.run(
+ method, path, qs,
+ tonative(req.request_protocol),
+ headers, rfile,
+ )
break
except cherrypy.InternalRedirect:
ir = sys.exc_info()[1]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.1.1/cherrypy/process/win32.py
new/CherryPy-18.1.2/cherrypy/process/win32.py
--- old/CherryPy-18.1.1/cherrypy/process/win32.py 2019-03-27
15:36:33.000000000 +0100
+++ new/CherryPy-18.1.2/cherrypy/process/win32.py 2019-06-23
17:26:59.000000000 +0200
@@ -20,7 +20,7 @@
def start(self):
if self.is_set:
- self.bus.log('Handler for console events already set.', level=40)
+ self.bus.log('Handler for console events already set.', level=20)
return
result = win32api.SetConsoleCtrlHandler(self.handle, 1)
@@ -33,7 +33,7 @@
def stop(self):
if not self.is_set:
- self.bus.log('Handler for console events already off.', level=40)
+ self.bus.log('Handler for console events already off.', level=20)
return
try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.1.1/cherrypy/test/test_native.py
new/CherryPy-18.1.2/cherrypy/test/test_native.py
--- old/CherryPy-18.1.1/cherrypy/test/test_native.py 2019-03-27
15:36:33.000000000 +0100
+++ new/CherryPy-18.1.2/cherrypy/test/test_native.py 2019-06-23
17:26:59.000000000 +0200
@@ -32,4 +32,7 @@
def test_basic_request(cp_native_server):
"""A request to a native server should succeed."""
- cp_native_server.get('/')
+ resp = cp_native_server.get('/')
+ assert resp.ok
+ assert resp.status_code == 200
+ assert resp.text == 'Hello World!'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.1.1/docs/basics.rst
new/CherryPy-18.1.2/docs/basics.rst
--- old/CherryPy-18.1.1/docs/basics.rst 2019-03-27 15:36:33.000000000 +0100
+++ new/CherryPy-18.1.2/docs/basics.rst 2019-06-23 17:26:59.000000000 +0200
@@ -839,7 +839,7 @@
``server.peercreds`` enables looking up the connected process ID,
user ID and group ID. They'll be accessible as WSGI environment
-variables::
+variables:
* ``X_REMOTE_PID``
@@ -848,7 +848,7 @@
* ``X_REMOTE_GID``
``server.peercreds_resolve`` resolves that into user name and group
-name. They'll be accessible as WSGI environment variables::
+name. They'll be accessible as WSGI environment variables:
* ``X_REMOTE_USER`` and ``REMOTE_USER``
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.1.1/tox.ini new/CherryPy-18.1.2/tox.ini
--- old/CherryPy-18.1.1/tox.ini 2019-03-27 15:36:33.000000000 +0100
+++ new/CherryPy-18.1.2/tox.ini 2019-06-23 17:26:59.000000000 +0200
@@ -3,6 +3,11 @@
minversion = 2.4
[testenv]
+# Hotfix for https://github.com/pypa/pip/issues/6434
+# Based on https://github.com/jaraco/skeleton/commit/123b0b2
+# Check https://github.com/tox-dev/tox/issues/1276 for the final solution
+install_command =
+ python -c 'import subprocess, sys; pip_inst_cmd = sys.executable, "-m",
"pip", "install"; subprocess.check_call(pip_inst_cmd + ("pip<19.1", ));
subprocess.check_call(pip_inst_cmd + tuple(sys.argv[1:]))' {opts} {packages}
usedevelop = True
commands =
pytest {posargs}
++++++ pytest5.patch ++++++
>From 96b34dfea7853b0189bc0a3878b6ddff0d4e505c Mon Sep 17 00:00:00 2001
From: Sviatoslav Sydorenko <[email protected]>
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 <[email protected]>
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):