diff --git a/cheroot-8.5.2.tar.gz b/cheroot-8.5.2.tar.gz deleted file mode 100644 index 445507b..0000000 --- a/cheroot-8.5.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f137d03fd5155b1364bea557a7c98168665c239f6c8cedd8f80e81cdfac01567 -size 113183 diff --git a/cheroot-8.6.0.tar.gz b/cheroot-8.6.0.tar.gz new file mode 100644 index 0000000..81e4553 --- /dev/null +++ b/cheroot-8.6.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:366adf6e7cac9555486c2d1be6297993022eff6f8c4655c1443268cca3f08e25 +size 134779 diff --git a/cheroot-c0b1b167-py310-threaddeprecations.patch b/cheroot-c0b1b167-py310-threaddeprecations.patch deleted file mode 100644 index 19f5321..0000000 --- a/cheroot-c0b1b167-py310-threaddeprecations.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cheroot/server.py b/cheroot/server.py -index 8b59a33af..10153dde3 100644 ---- a/cheroot/server.py -+++ b/cheroot/server.py -@@ -1841,7 +1841,7 @@ def _run_in_thread(self): - """Context manager for running this server in a thread.""" - self.prepare() - thread = threading.Thread(target=self.serve) -- thread.setDaemon(True) -+ thread.daemon = True - thread.start() - try: - yield thread diff --git a/cheroot-pr370-py310-threaddeprecations.patch b/cheroot-pr370-py310-threaddeprecations.patch deleted file mode 100644 index 962ecae..0000000 --- a/cheroot-pr370-py310-threaddeprecations.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cheroot/workers/threadpool.py b/cheroot/workers/threadpool.py -index 915934cce..57e6588dd 100644 ---- a/cheroot/workers/threadpool.py -+++ b/cheroot/workers/threadpool.py -@@ -320,7 +320,7 @@ def _clear_threads(self): - return ( - thread - for thread in threads -- if thread is not threading.currentThread() -+ if thread is not threading.current_thread() - ) - - @property diff --git a/cheroot-pr371-py310-threaddeprecations.patch b/cheroot-pr371-py310-threaddeprecations.patch deleted file mode 100644 index 736f3a2..0000000 --- a/cheroot-pr371-py310-threaddeprecations.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/cheroot/workers/threadpool.py b/cheroot/workers/threadpool.py -index 57e6588dd..6305085de 100644 ---- a/cheroot/workers/threadpool.py -+++ b/cheroot/workers/threadpool.py -@@ -108,7 +108,7 @@ def run(self): - - Retrieves incoming connections from thread pool. - """ -- self.server.stats['Worker Threads'][self.getName()] = self.stats -+ self.server.stats['Worker Threads'][self.name] = self.stats - try: - self.ready = True - while True: -@@ -176,9 +176,9 @@ def start(self): - for i in range(self.min): - self._threads.append(WorkerThread(self.server)) - for worker in self._threads: -- worker.setName( -+ worker.name = ( - 'CP Server {worker_name!s}'. -- format(worker_name=worker.getName()), -+ format(worker_name=worker.name), - ) - worker.start() - for worker in self._threads: -@@ -226,9 +226,9 @@ def grow(self, amount): - - def _spawn_worker(self): - worker = WorkerThread(self.server) -- worker.setName( -+ worker.name = ( - 'CP Server {worker_name!s}'. -- format(worker_name=worker.getName()), -+ format(worker_name=worker.name), - ) - worker.start() - return worker diff --git a/no-pypytools.patch b/no-pypytools.patch new file mode 100644 index 0000000..f669d60 --- /dev/null +++ b/no-pypytools.patch @@ -0,0 +1,40 @@ +--- + cheroot/test/test_server.py | 13 ------------- + 1 file changed, 13 deletions(-) + +--- a/cheroot/test/test_server.py ++++ b/cheroot/test/test_server.py +@@ -16,7 +16,6 @@ import requests + import requests_unixsocket + import six + +-from pypytools.gc.custom import DefaultGc + from six.moves import queue, urllib + + from .._compat import bton, ntob +@@ -370,13 +369,6 @@ if not IS_WINDOWS: + + + @pytest.fixture +-def _garbage_bin(): +- """Disable garbage collection when this fixture is in use.""" +- with DefaultGc().nogc(): +- yield +- +- +-@pytest.fixture + def resource_limit(request): + """Set the resource limit two times bigger then requested.""" + resource = pytest.importorskip( +@@ -405,11 +397,6 @@ def resource_limit(request): + @pytest.fixture + def many_open_sockets(request, resource_limit): + """Allocate a lot of file descriptors by opening dummy sockets.""" +- # NOTE: `@pytest.mark.usefixtures` doesn't work on fixtures which +- # NOTE: forces us to invoke this one dynamically to avoid having an +- # NOTE: unused argument. +- request.getfixturevalue('_garbage_bin') +- + # Hoard a lot of file descriptors by opening and storing a lot of sockets + test_sockets = [] + # Open a lot of file descriptors, so the next one the server diff --git a/python-cheroot.changes b/python-cheroot.changes index 5a0261a..fde6027 100644 --- a/python-cheroot.changes +++ b/python-cheroot.changes @@ -1,3 +1,31 @@ +------------------------------------------------------------------- +Sat Jan 22 17:17:44 UTC 2022 - Ben Greiner + +- The work around needs to ignore the testfile from the sitelib + +------------------------------------------------------------------- +Sat Jan 22 12:25:02 UTC 2022 - Ben Greiner + +- Work around xdist related conftest import error + +------------------------------------------------------------------- +Fri Jan 21 16:53:38 UTC 2022 - Matej Cepl + +- Update to 8.6.0: + - #384 via PR #385, PR #406: Exposed type stubs with + annotations for public API + - PR #401 (related to the PR #352 effort): Started reusing the + the expriration_interval setting in the low-level + select.select() invocation, + effectively reducing the system load under the Windows OS + when idle, that is noticeable on low-end hardware systems +- Removed upstreamed patches + - cheroot-pr370-py310-threaddeprecations.patch + - cheroot-pr371-py310-threaddeprecations.patch + - cheroot-c0b1b167-py310-threaddeprecations.patch +- Add no-pypytools.patch removing the dependency on pypytools as + we don't have PyPy in openSUSE at all. + ------------------------------------------------------------------- Sun Dec 19 21:13:43 UTC 2021 - Ben Greiner diff --git a/python-cheroot.spec b/python-cheroot.spec index eb64401..98a2824 100644 --- a/python-cheroot.spec +++ b/python-cheroot.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,15 +27,15 @@ %bcond_without python2 %bcond_with ringdisabled Name: python-%{pypi_name} -Version: 8.5.2 +Version: 8.6.0 Release: 0 Summary: Pure-python HTTP server License: BSD-3-Clause URL: https://github.com/cherrypy/cheroot Source: https://files.pythonhosted.org/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz -Patch0: https://github.com/cherrypy/cheroot/pull/370.diff#/cheroot-pr370-py310-threaddeprecations.patch -Patch1: https://github.com/cherrypy/cheroot/pull/371.diff#/cheroot-pr371-py310-threaddeprecations.patch -Patch2: https://github.com/cherrypy/cheroot/commit/0b16749ecdfa064315fc7908f6865071fc33d778.diff#/cheroot-c0b1b167-py310-threaddeprecations.patch +# PATCH-FIX-OPENSUSE no-pypytools.patch mcepl@suse.com +# We don't have PyPy at all, so no need support for it +Patch0: no-pypytools.patch BuildRequires: %{python_module jaraco.functools} BuildRequires: %{python_module more-itertools >= 2.6} BuildRequires: %{python_module setuptools >= 34.4} @@ -104,15 +104,16 @@ sed -i '/--cov/ d' pytest.ini %python_expand %fdupes %{buildroot}%{$python_sitelib} %check +mkdir testclean +pushd testclean %if %{with ringdisabled} # skip this test file (1 test only) in Factory staging, because we # do not want to add python-jaraco.context to Ring1 -pytest_opts="--ignore cheroot/test/test_wsgi.py" +%python_expand pytest_opts+=" --ignore %{buildroot}%{$python_sitelib}/cheroot/test/test_wsgi.py" %endif -# https://github.com/cherrypy/cheroot/issues/355 -pytest_opts+=" -p no:threadexception" # test_tls_client_auth[...-False-localhost-builtin] fails ocassionally on server-side OBS -%pytest $pytest_opts -k "not (test_tls_client_auth and False-localhost-builtin)" +%pytest --pyargs cheroot $pytest_opts -k "not (test_tls_client_auth and False-localhost-builtin)" +popd %pre # If libalternatives is used: Removing old update-alternatives entries.