forked from pool/python-cheroot
- 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 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cheroot?expand=0&rev=40
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f137d03fd5155b1364bea557a7c98168665c239f6c8cedd8f80e81cdfac01567
|
||||
size 113183
|
||||
3
cheroot-8.6.0.tar.gz
Normal file
3
cheroot-8.6.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:366adf6e7cac9555486c2d1be6297993022eff6f8c4655c1443268cca3f08e25
|
||||
size 134779
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
40
no-pypytools.patch
Normal file
40
no-pypytools.patch
Normal file
@@ -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
|
||||
@@ -1,3 +1,19 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 21 16:53:38 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- 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
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 19 21:13:43 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user