Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-servers/gunicorn/files/, www-servers/gunicorn/
Date: Sat, 19 Jun 2021 12:26:38
Message-Id: 1624105589.4430667ae7647b2cc72fa34e7d617824bb8b70ca.mgorny@gentoo
1 commit: 4430667ae7647b2cc72fa34e7d617824bb8b70ca
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jun 19 12:14:47 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 19 12:26:29 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4430667a
7
8 www-servers/gunicorn: Patch eventlet-related test failures
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 .../files/gunicorn-20.1.0-new-eventlet.patch | 31 ++++++++++++++++++++++
13 www-servers/gunicorn/gunicorn-20.1.0.ebuild | 3 ++-
14 2 files changed, 33 insertions(+), 1 deletion(-)
15
16 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
17 new file mode 100644
18 index 00000000000..0ba4faffe63
19 --- /dev/null
20 +++ b/www-servers/gunicorn/files/gunicorn-20.1.0-new-eventlet.patch
21 @@ -0,0 +1,31 @@
22 +From a244b149b15c4417b4f0a4b4a57a1f8c296e968e Mon Sep 17 00:00:00 2001
23 +From: Daniel Bibik <55541040+Boring-Mind@××××××××××××××××××××.com>
24 +Date: Mon, 10 May 2021 12:31:29 +0300
25 +Subject: [PATCH] Fix compatibility with latest eventlet
26 +
27 +Fix issue with import error while using latest eventlet (>=0.30.3).
28 +
29 +Changes made in eventlet: https://github.com/benoitc/gunicorn/pull/2581
30 +---
31 + gunicorn/workers/geventlet.py | 8 +++++++-
32 + 1 file changed, 7 insertions(+), 1 deletion(-)
33 +
34 +diff --git a/gunicorn/workers/geventlet.py b/gunicorn/workers/geventlet.py
35 +index ffdb206c0..06477e74d 100644
36 +--- a/gunicorn/workers/geventlet.py
37 ++++ b/gunicorn/workers/geventlet.py
38 +@@ -17,7 +17,13 @@
39 +
40 + from eventlet import hubs, greenthread
41 + from eventlet.greenio import GreenSocket
42 +-from eventlet.wsgi import ALREADY_HANDLED as EVENTLET_ALREADY_HANDLED
43 ++
44 ++try:
45 ++ from eventlet.wsgi import ALREADY_HANDLED as EVENTLET_ALREADY_HANDLED
46 ++except ImportError:
47 ++ # Since eventlet 0.30.3
48 ++ from eventlet.wsgi import WSGI_LOCAL as EVENTLET_ALREADY_HANDLED
49 ++
50 + import greenlet
51 +
52 + from gunicorn.workers.base_async import AsyncWorker
53
54 diff --git a/www-servers/gunicorn/gunicorn-20.1.0.ebuild b/www-servers/gunicorn/gunicorn-20.1.0.ebuild
55 index 937224d87db..db3c9a31a67 100644
56 --- a/www-servers/gunicorn/gunicorn-20.1.0.ebuild
57 +++ b/www-servers/gunicorn/gunicorn-20.1.0.ebuild
58 @@ -4,7 +4,7 @@
59 EAPI=7
60
61 DISTUTILS_USE_SETUPTOOLS=rdepend
62 -PYTHON_COMPAT=( pypy3 python3_{7..9} )
63 +PYTHON_COMPAT=( pypy3 python3_{8..9} )
64
65 inherit distutils-r1 optfeature
66
67 @@ -22,6 +22,7 @@ RDEPEND="dev-python/setproctitle[${PYTHON_USEDEP}]"
68
69 PATCHES=(
70 "${FILESDIR}"/${PN}-20.1.0-tests_optional_modules.patch
71 + "${FILESDIR}"/${P}-new-eventlet.patch
72 )
73
74 DOCS=( README.rst )