[packages/python3-gunicorn] - up to 23.0.0

baggins baggins at pld-linux.org
Sat Apr 26 23:11:48 CEST 2025


commit 2b93e3b420ee799259e87dbf74fc5a57b3a61e04
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Apr 27 01:11:31 2025 +0200

    - up to 23.0.0

 gunicorn-eventlet0.30.patch | 50 ---------------------------------------------
 python3-gunicorn.spec       | 29 ++++++++++++++------------
 2 files changed, 16 insertions(+), 63 deletions(-)
---
diff --git a/python3-gunicorn.spec b/python3-gunicorn.spec
index 676d669..54a9c97 100644
--- a/python3-gunicorn.spec
+++ b/python3-gunicorn.spec
@@ -6,19 +6,19 @@
 Summary:	Python WSGI application server
 Summary(pl.UTF-8):	Pythonowy serwer aplikacji WSGI
 Name:		python3-%{module}
-Version:	20.1.0
-Release:	5
+Version:	23.0.0
+Release:	1
 License:	MIT
 Group:		Daemons
 #Source0Download: https://pypi.org/simple/gunicorn/
 Source0:	https://files.pythonhosted.org/packages/source/g/gunicorn/%{module}-%{version}.tar.gz
-# Source0-md5:	db8a7c5c2064000af70286534803bf1d
-Patch0:		gunicorn-eventlet0.30.patch
+# Source0-md5:	18b666db62a890579170639961c5b064
 # distro-specific, not upstreamable
 Patch100:	%{name}-dev-log.patch
 URL:		https://gunicorn.org/
 BuildRequires:	python3-devel >= 1:3.5
-BuildRequires:	python3-setuptools >= 1:3.0
+BuildRequires:	python3-build
+BuildRequires:	python3-installer
 %if %{with tests}
 BuildRequires:	python3-aiohttp
 BuildRequires:	python3-coverage >= 4.0
@@ -51,20 +51,23 @@ aplikacje WSGI, Django i Paster.
 
 %prep
 %setup -q -n %{module}-%{version}
-%patch -P 0 -p1
 %patch -P 100 -p1
 
 %build
-export PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 PYTEST_PLUGINS="pytest_cov.plugin"
+%py3_build_pyproject
 
-%py3_build %{?with_tests:test}
+%if %{with tests}
+%{__python3} -m zipfile -e build-3/*.whl build-3-test
+# use explicit plugins list for reliable builds (delete PYTEST_PLUGINS if empty)
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS="pytest_cov.plugin" \
+%{__python3} -m pytest -o pythonpath="$PWD/build-3-test" tests
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%py3_install
-
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/{gunicorn,gunicorn-3}
+%py3_install_pyproject
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -72,6 +75,6 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc LICENSE NOTICE README.rst THANKS
-%attr(755,root,root) %{_bindir}/gunicorn-3
+%attr(755,root,root) %{_bindir}/gunicorn
 %{py3_sitescriptdir}/gunicorn
-%{py3_sitescriptdir}/gunicorn-%{version}-py*.egg-info
+%{py3_sitescriptdir}/gunicorn-%{version}.dist-info
diff --git a/gunicorn-eventlet0.30.patch b/gunicorn-eventlet0.30.patch
deleted file mode 100644
index 444dc47..0000000
--- a/gunicorn-eventlet0.30.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 6a8ebb4844b2f28596ffe7421eb9f7d08c8dc4d8 Mon Sep 17 00:00:00 2001
-From: Sergey Shepelev <temotor at gmail.com>
-Date: Thu, 6 May 2021 12:54:06 +0300
-Subject: [PATCH] eventlet worker: ALREADY_HANDLED -> WSGI_LOCAL
-
-Eventlet v0.30.3+ removed wsgi.ALREADY_HANDLED in favor of
-`wsgi.WSGI_LOCAL.already_handled: bool`
-
-Sorry, this breaking change happened during only patch
-version increase 0.30.2 -> 0.30.3
-
-https://github.com/eventlet/eventlet/issues/543
-https://github.com/eventlet/eventlet/pull/544
----
- gunicorn/workers/geventlet.py | 11 ++++++++++-
- 1 file changed, 10 insertions(+), 1 deletion(-)
-
-diff --git a/gunicorn/workers/geventlet.py b/gunicorn/workers/geventlet.py
-index ffdb206c0..ea82f3d62 100644
---- a/gunicorn/workers/geventlet.py
-+++ b/gunicorn/workers/geventlet.py
-@@ -17,11 +17,16 @@
- 
- from eventlet import hubs, greenthread
- from eventlet.greenio import GreenSocket
--from eventlet.wsgi import ALREADY_HANDLED as EVENTLET_ALREADY_HANDLED
-+import eventlet.wsgi
- import greenlet
- 
- from gunicorn.workers.base_async import AsyncWorker
- 
-+# ALREADY_HANDLED is removed in 0.30.3+ now it's `WSGI_LOCAL.already_handled: bool`
-+# https://github.com/eventlet/eventlet/pull/544
-+EVENTLET_WSGI_LOCAL = getattr(eventlet.wsgi, "WSGI_LOCAL", None)
-+EVENTLET_ALREADY_HANDLED = getattr(eventlet.wsgi, "ALREADY_HANDLED", None)
-+
- 
- def _eventlet_socket_sendfile(self, file, offset=0, count=None):
-     # Based on the implementation in gevent which in turn is slightly
-@@ -125,6 +130,10 @@ def patch(self):
-         patch_sendfile()
- 
-     def is_already_handled(self, respiter):
-+        # eventlet >= 0.30.3
-+        if getattr(EVENTLET_WSGI_LOCAL, "already_handled", None):
-+            raise StopIteration()
-+        # eventlet < 0.30.3
-         if respiter == EVENTLET_ALREADY_HANDLED:
-             raise StopIteration()
-         return super().is_already_handled(respiter)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-gunicorn.git/commitdiff/2b93e3b420ee799259e87dbf74fc5a57b3a61e04



More information about the pld-cvs-commit mailing list