From 4922cae22fa887f6e36030a2952efd082e11dbb5 Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Mon, 25 Jan 2021 14:44:29 +0000 Subject: [PATCH] [FIX] requirements: fix gevent and greenlet compatibility issue When Odoo is started in worker mode with Python 3.8.5, and gevent/greenlet installed from requirements, the following error message is thrown: `RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility` As a gevent developper stated [1] that gevent 1.5 is not compatible with Python 3.8, this commit bumps the version to 20.9.0 (current version for the next Debian and Ubuntu releases [2] [3]) This commit should not impact those who use the Debian/Ubuntu packages of gevent and greenlet. The error does not appear with those versions. In Ubuntu Focal, the packaged version is 1.4.0 [4] but the problem was not reported with this version and python 3.8. For reference, it was bumped to 1.5.0 for Python 3.7 in [5]. And greenlet was bumped too for issues with Python 3.8 and 3.9 in [6]. As a result, the requirements for greenlet/gevents gains even more complexity and should be cleaned when python 3.6 support will be dropped. [1] https://github.com/gevent/gevent/issues/1260 [2] https://packages.debian.org/bullseye/python3-gevent [3] https://packages.ubuntu.com/hirsute/python3-gevent [4] https://packages.ubuntu.com/focal/python3-gevent [5] odoo/odoo@bb0b32bd1a3fc0c047d0787b10e8c1c8d696daa5 [6] odoo/odoo/@648635deca67df09417ae55c6eb181c98524b74d Fixes #64106 closes odoo/odoo#65180 X-original-commit: 1622aa755bb67e2d9e6efd18366be49b8e4783cb Signed-off-by: Christophe Monniez (moc) --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 554ac0e693d..5c178d866c0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,8 @@ feedparser==5.2.1 freezegun==0.3.11; python_version < '3.8' freezegun==0.3.15; python_version >= '3.8' gevent==1.1.2 ; sys_platform != 'win32' and python_version < '3.7' -gevent==1.5.0 ; python_version >= '3.7' +gevent==1.5.0 ; python_version == '3.7' +gevent==20.9.0 ; python_version >= '3.8' gevent==1.4.0 ; sys_platform == 'win32' and python_version < '3.7' greenlet==0.4.10 ; python_version < '3.7' greenlet==0.4.15 ; python_version == '3.7'