From e7c70e3635ace18150d8d9e7988dacbdd9486201 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Wed, 9 Oct 2019 09:14:23 +0000 Subject: [PATCH] [FIX] packaging,doc: minimum python version is 3.6 In 12.0 it was 3.5 but for 13.0, it is acceptable 3.6. Debian Buster has 3.7 and Ubuntu 18.04 LTS has 3.6 This will avoid undeterminist errors with OrderedDict CentOS 7 still does not ship python3 by default but it is possible to install it and CentOS 8 with python 3.6 was released in septembre 2019 closes odoo/odoo#38827 X-original-commit: 14e3e7524c2edd08ddf19afe512cb4462d070c0b Signed-off-by: Martin Trigaux (mat) --- doc/setup/install.rst | 16 +++++++--------- odoo/__init__.py | 3 +-- setup.py | 2 +- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/doc/setup/install.rst b/doc/setup/install.rst index 4b9d0735a2655..0dd98f59f9287 100644 --- a/doc/setup/install.rst +++ b/doc/setup/install.rst @@ -200,9 +200,7 @@ If you need this feature, you can install the python module like this: Fedora '''''' -Odoo 13.0 'rpm' package supports Fedora 26. -As of 2017, CentOS does not have the minimum Python requirements (3.5) for -Odoo 13.0. +Odoo 13.0 'rpm' package supports Fedora 30. Prepare ^^^^^^^ @@ -330,13 +328,13 @@ Prepare Python ^^^^^^ -Odoo requires Python 3.5 or later to run. Use the the official `Python 3 installer +Odoo requires Python 3.6 or later to run. Use the the official `Python 3 installer `_ to download and install Python 3 on your machine. During installation, check **Add Python 3 to PATH**, then click **Customize Installation** and make sure that **pip** is checked. -.. note:: If Python 3 is already installed, make sure that it is 3.5 or above, as previous versions +.. note:: If Python 3 is already installed, make sure that it is 3.6 or above, as previous versions are not compatible with Odoo. .. code-block:: doscon @@ -490,10 +488,10 @@ Prepare Python ^^^^^^ -Odoo requires Python 3.5 or later to run. Use your package manager to download and install Python 3 +Odoo requires Python 3.6 or later to run. Use your package manager to download and install Python 3 on your machine if it is not already done. -.. note:: If Python 3 is already installed, make sure that it is 3.5 or above, as previous versions +.. note:: If Python 3 is already installed, make sure that it is 3.6 or above, as previous versions are not compatible with Odoo. .. code-block:: console @@ -646,10 +644,10 @@ Prepare Python ^^^^^^ -Odoo requires Python 3.5 or later to run. Use your preferred package manager (homebrew_, macports_) +Odoo requires Python 3.6 or later to run. Use your preferred package manager (homebrew_, macports_) to download and install Python 3 on your machine if it is not already done. -.. note:: If Python 3 is already installed, make sure that it is 3.5 or above, as previous versions +.. note:: If Python 3 is already installed, make sure that it is 3.6 or above, as previous versions are not compatible with Odoo. .. code-block:: console diff --git a/odoo/__init__.py b/odoo/__init__.py index 49c78193233a3..30da36082372d 100644 --- a/odoo/__init__.py +++ b/odoo/__init__.py @@ -10,9 +10,8 @@ #---------------------------------------------------------- __path__ = __import__('pkgutil').extend_path(__path__, __name__) -# As of version 12.0, python 2 is no longer supported, ensure py version is >= 3.5 import sys -assert sys.version_info > (3, 5), "Python 2 detected, Odoo requires Python >= 3.5 to run." +assert sys.version_info > (3, 6), "Outdated python version detected, Odoo requires Python >= 3.6 to run." #---------------------------------------------------------- # Running mode flags (gevent, prefork) diff --git a/setup.py b/setup.py index 00d90191525d5..47ea33a5a8286 100644 --- a/setup.py +++ b/setup.py @@ -57,7 +57,7 @@ 'xlsxwriter', 'xlwt', ], - python_requires='>=3.5', + python_requires='>=3.6', extras_require={ 'ldap': ['pyldap'], 'SSL': ['pyopenssl'],