From 4f064c9d5e12b9ed48bbb78c3c1c40217150ad40 Mon Sep 17 00:00:00 2001 From: Matthias Runge Date: Aug 09 2021 15:29:34 +0000 Subject: Update to 18.6.1 Resolves: rhbz#1978987 --- diff --git a/0001.patch b/0001.patch deleted file mode 100644 index ff703c0..0000000 --- a/0001.patch +++ /dev/null @@ -1,42 +0,0 @@ -From e2cc6f4ab6baf45d3ca19295759f01af98dd2ab2 Mon Sep 17 00:00:00 2001 -From: Alfredo Deza -Date: Wed, 20 Nov 2019 18:01:36 -0500 -Subject: [PATCH] use pytest 3.4 compatible fixtures for tmp paths - -The latest version of pytest in EPEL8 is 3.4.2 which is missing the -fixtures used by CherryPy. - -Upstream issue: https://github.com/cherrypy/cherrypy/issues/1824 ---- - cherrypy/test/test_logging.py | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -diff --git a/cherrypy/test/test_logging.py b/cherrypy/test/test_logging.py -index 5308fb72..87f48d13 100644 ---- a/cherrypy/test/test_logging.py -+++ b/cherrypy/test/test_logging.py -@@ -16,13 +16,17 @@ erebos = u'\u0388\u03c1\u03b5\u03b2\u03bf\u03c2.com' - - - @pytest.fixture --def access_log_file(tmp_path_factory): -- return tmp_path_factory.mktemp('logs') / 'access.log' -+def access_log_file(tmpdir): -+ p = tmpdir.mkdir("access_logs").join("access.log") -+ p.write("") -+ return p - - - @pytest.fixture --def error_log_file(tmp_path_factory): -- return tmp_path_factory.mktemp('logs') / 'access.log' -+def error_log_file(tmpdir): -+ p = tmpdir.mkdir("error_logs").join("error.log") -+ p.write("") -+ return p - - - @pytest.fixture --- -2.20.1 - diff --git a/24dad62322.patch b/24dad62322.patch deleted file mode 100644 index d10fb9a..0000000 --- a/24dad62322.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 59c0e19d7df8680e36afc96756dce72435121448 Mon Sep 17 00:00:00 2001 -From: Duncan Bellamy -Date: Sun, 17 Jan 2021 03:02:24 +0100 -Subject: [PATCH 1/2] Close streamed file in file_generator on destruct - ---- - cherrypy/lib/__init__.py | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/cherrypy/lib/__init__.py b/cherrypy/lib/__init__.py -index f815f76a..0edaaf20 100644 ---- a/cherrypy/lib/__init__.py -+++ b/cherrypy/lib/__init__.py -@@ -70,6 +70,11 @@ def __next__(self): - raise StopIteration() - next = __next__ - -+ def __del__(self): -+ """Close input on descturct.""" -+ if hasattr(self.input, 'close'): -+ self.input.close() -+ - - def file_generator_limited(fileobj, count, chunk_size=65536): - """Yield the given file object in chunks. - -From 4a6287b73539adcb7b0ae72d69644a1ced1f7eaa Mon Sep 17 00:00:00 2001 -From: Duncan Bellamy -Date: Fri, 15 Jan 2021 14:49:09 +0000 -Subject: [PATCH 2/2] Close hanging fd in testHandlerToolConfigOverride - ---- - cherrypy/test/test_config.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/cherrypy/test/test_config.py b/cherrypy/test/test_config.py -index 5e880d87..ecd46019 100644 ---- a/cherrypy/test/test_config.py -+++ b/cherrypy/test/test_config.py -@@ -221,8 +221,8 @@ def testHandlerToolConfigOverride(self): - # the favicon in the page handler to be '../favicon.ico', - # but then overrode it in config to be './static/dirback.jpg'. - self.getPage('/favicon.ico') -- self.assertBody(open(os.path.join(localDir, 'static/dirback.jpg'), -- 'rb').read()) -+ with open(os.path.join(localDir, 'static/dirback.jpg'), 'rb') as tf: -+ self.assertBody(tf.read()) - - def test_request_body_namespace(self): - self.getPage('/plain', method='POST', headers=[ diff --git a/3bae7f0686.patch b/3bae7f0686.patch deleted file mode 100644 index 5d8cc2f..0000000 --- a/3bae7f0686.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 3bae7f06868553b006915f05ff14d86163f59a7d Mon Sep 17 00:00:00 2001 -From: Sviatoslav Sydorenko -Date: Sun, 17 Jan 2021 02:51:53 +0100 -Subject: [PATCH] Ignore pytest 6.2.0 resource warnings under py 3.8 - -Refs: -* #1897 -* https://docs.pytest.org/en/stable/usage.html#unraisable -* https://github.com/pytest-dev/pytest/issues/5299 ---- - pytest.ini | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/pytest.ini b/pytest.ini -index 909f146c..89197092 100644 ---- a/pytest.ini -+++ b/pytest.ini -@@ -33,6 +33,13 @@ addopts = - doctest_optionflags = ALLOW_UNICODE ELLIPSIS - filterwarnings = - error -+ -+ # pytest>=6.2.0 under Python 3.8: -+ # Ref: https://docs.pytest.org/en/stable/usage.html#unraisable -+ # Ref: https://github.com/pytest-dev/pytest/issues/5299 -+ ignore:Exception ignored in. :pytest.PytestUnraisableExceptionWarning:_pytest.unraisableexception -+ ignore:Exception ignored in. <_io.FileIO .closed.>:pytest.PytestUnraisableExceptionWarning:_pytest.unraisableexception -+ - ignore:Use cheroot.test.webtest:DeprecationWarning - ignore:This method will be removed in future versions.*:DeprecationWarning - ignore:Unable to verify that the server is bound on:UserWarning diff --git a/python-cherrypy.spec b/python-cherrypy.spec index 12dbb8c..54a7697 100644 --- a/python-cherrypy.spec +++ b/python-cherrypy.spec @@ -9,30 +9,16 @@ Name: python-cherrypy %global camelname CherryPy -Version: 18.6.0 -Release: 6%{?dist} +Version: 18.6.1 +Release: 1%{?dist} Summary: Pythonic, object-oriented web development framework License: BSD URL: http://www.cherrypy.org/ Source0: https://files.pythonhosted.org/packages/source/C/%{camelname}/%{camelname}-%{version}.tar.gz -# Don't ship the tests or tutorials in the python module directroy, -# tutorial will be shipped as doc instead - -# https://github.com/cherrypy/cherrypy/issues/1824 -# Do not use newer pytest fixtures that aren't part of pytest 3.4.2 - this can be -# removed once 3.9.1 (or newer) is packaged. -Patch0: 0001.patch - -# Patches backported from upstream to fix many pytest unraisable exception errors. -# However, does not fix all yet, so we use -p no:unraisableexception anyway. -# When removing the patches, also try to remove -p no:unraisableexception. -Patch1: https://github.com/cherrypy/cherrypy/commit/3bae7f0686.patch -Patch2: https://github.com/cherrypy/cherrypy/commit/24dad62322.patch - # Ignore thread-related DeprecationWarnings new in Python 3.10 # Temporary workaround for https://github.com/cherrypy/cherrypy/issues/1914 -Patch3: pytest-ignore-thread-DeprecationWarnings.patch +Patch1: pytest-ignore-thread-DeprecationWarnings.patch BuildArch: noarch @@ -107,6 +93,9 @@ export WEBTEST_INTERACTIVE=false %exclude %{python3_sitelib}/cherrypy/tutorial %changelog +* Mon Aug 09 2021 Matthias Runge - 18.6.1-1 +- rebase to 18.6.1 (rhbz#1978987) + * Fri Jul 23 2021 Fedora Release Engineering - 18.6.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/sources b/sources index 07e4ded..0c7707a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (CherryPy-18.6.0.tar.gz) = cd33303fa9b9704ef427553091a6a6c2bbfea20e7d81acd2bcdc2855f8a36a084a0781bb19f3a084b24f0664bd7b318a667c8c79b5073381901acce4602de9d7 +SHA512 (CherryPy-18.6.1.tar.gz) = 186a0992a443e1ffc1a2924b3351dcb0e6cc6c88b39ac32330d6365fe1b0a35c2008a3a18e1a57f61ffd1901ea6134333bb6288024d8ffbb1fd8e8dcd3145007