Skip to content

Commit

Permalink
[FIX] requirements: fix gevent and greenlet compatibility issue
Browse files Browse the repository at this point in the history
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] gevent/gevent#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] bb0b32b
[6] odoo/odoo/@648635deca67df09417ae55c6eb181c98524b74d

Fixes #64106

closes #65012

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
  • Loading branch information
d-fence committed Jan 25, 2021
1 parent b4e12c4 commit 1622aa7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 1622aa7

Please sign in to comment.