summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-06-19 14:14:47 +0200
committerMichał Górny <mgorny@gentoo.org>2021-06-19 14:26:29 +0200
commit4430667ae7647b2cc72fa34e7d617824bb8b70ca (patch)
tree13e0895c3868332f87db5fbae89a6a96f579dcdc /www-servers/gunicorn
parentdev-util/rpmdevtools: remove 8.10-r2 (diff)
downloadgentoo-4430667ae7647b2cc72fa34e7d617824bb8b70ca.tar.gz
gentoo-4430667ae7647b2cc72fa34e7d617824bb8b70ca.tar.bz2
gentoo-4430667ae7647b2cc72fa34e7d617824bb8b70ca.zip
www-servers/gunicorn: Patch eventlet-related test failures
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'www-servers/gunicorn')
-rw-r--r--www-servers/gunicorn/files/gunicorn-20.1.0-new-eventlet.patch31
-rw-r--r--www-servers/gunicorn/gunicorn-20.1.0.ebuild3
2 files changed, 33 insertions, 1 deletions
diff --git a/www-servers/gunicorn/files/gunicorn-20.1.0-new-eventlet.patch b/www-servers/gunicorn/files/gunicorn-20.1.0-new-eventlet.patch
new file mode 100644
index 000000000000..0ba4faffe639
--- /dev/null
+++ b/www-servers/gunicorn/files/gunicorn-20.1.0-new-eventlet.patch
@@ -0,0 +1,31 @@
+From a244b149b15c4417b4f0a4b4a57a1f8c296e968e Mon Sep 17 00:00:00 2001
+From: Daniel Bibik <55541040+Boring-Mind@users.noreply.github.com>
+Date: Mon, 10 May 2021 12:31:29 +0300
+Subject: [PATCH] Fix compatibility with latest eventlet
+
+Fix issue with import error while using latest eventlet (>=0.30.3).
+
+Changes made in eventlet: https://github.com/benoitc/gunicorn/pull/2581
+---
+ gunicorn/workers/geventlet.py | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/gunicorn/workers/geventlet.py b/gunicorn/workers/geventlet.py
+index ffdb206c0..06477e74d 100644
+--- a/gunicorn/workers/geventlet.py
++++ b/gunicorn/workers/geventlet.py
+@@ -17,7 +17,13 @@
+
+ from eventlet import hubs, greenthread
+ from eventlet.greenio import GreenSocket
+-from eventlet.wsgi import ALREADY_HANDLED as EVENTLET_ALREADY_HANDLED
++
++try:
++ from eventlet.wsgi import ALREADY_HANDLED as EVENTLET_ALREADY_HANDLED
++except ImportError:
++ # Since eventlet 0.30.3
++ from eventlet.wsgi import WSGI_LOCAL as EVENTLET_ALREADY_HANDLED
++
+ import greenlet
+
+ from gunicorn.workers.base_async import AsyncWorker
diff --git a/www-servers/gunicorn/gunicorn-20.1.0.ebuild b/www-servers/gunicorn/gunicorn-20.1.0.ebuild
index 937224d87db1..db3c9a31a670 100644
--- a/www-servers/gunicorn/gunicorn-20.1.0.ebuild
+++ b/www-servers/gunicorn/gunicorn-20.1.0.ebuild
@@ -4,7 +4,7 @@
EAPI=7
DISTUTILS_USE_SETUPTOOLS=rdepend
-PYTHON_COMPAT=( pypy3 python3_{7..9} )
+PYTHON_COMPAT=( pypy3 python3_{8..9} )
inherit distutils-r1 optfeature
@@ -22,6 +22,7 @@ RDEPEND="dev-python/setproctitle[${PYTHON_USEDEP}]"
PATCHES=(
"${FILESDIR}"/${PN}-20.1.0-tests_optional_modules.patch
+ "${FILESDIR}"/${P}-new-eventlet.patch
)
DOCS=( README.rst )