Skip to content

Commit

Permalink
[FIX] packaging,doc: minimum python version is 3.6
Browse files Browse the repository at this point in the history
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#38827

X-original-commit: 14e3e75
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
  • Loading branch information
mart-e authored and fw-bot committed Oct 15, 2019
1 parent 024a0af commit e7c70e3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
16 changes: 7 additions & 9 deletions doc/setup/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
^^^^^^^
Expand Down Expand Up @@ -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
<https://www.python.org/downloads/windows/>`_ 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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions odoo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
'xlsxwriter',
'xlwt',
],
python_requires='>=3.5',
python_requires='>=3.6',
extras_require={
'ldap': ['pyldap'],
'SSL': ['pyopenssl'],
Expand Down

0 comments on commit e7c70e3

Please sign in to comment.