| |
@@ -1,54 +0,0 @@
|
| |
- From 153bf73a2ea2f23681f5cec19a90f212a36fdab9 Mon Sep 17 00:00:00 2001
|
| |
- From: Sergey Shepelev <temotor@gmail.com>
|
| |
- Date: Thu, 6 May 2021 12:54:06 +0300
|
| |
- Subject: [PATCH 2/2] 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
|
| |
- (cherry picked from commit 6a8ebb4844b2f28596ffe7421eb9f7d08c8dc4d8)
|
| |
- ---
|
| |
- 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 ffdb206c..ea82f3d6 100644
|
| |
- --- a/gunicorn/workers/geventlet.py
|
| |
- +++ b/gunicorn/workers/geventlet.py
|
| |
- @@ -17,11 +17,16 @@ else:
|
| |
-
|
| |
- 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 @@ class EventletWorker(AsyncWorker):
|
| |
- 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)
|
| |
- --
|
| |
- 2.35.3
|
| |
-
|
| |
EPEL 9 has eventlet 0.33.3. Proper support for eventlet >= 0.30.3 wasn't added gunicorn 21.0.0. EPEL 9 currenlty has gunicorn 20.1.0 with a backported patch of the upstream commit to address that incompatibility. Instead of relying on the backported patch, we can drop it and fast-forwarding the epel9 branch to what is currently in rawhide. This will take the package to version 21.2.0, which per the upstream changelog involves no breaking changes. This will also give us the recently added Python extras subpackages.