Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,26 @@ We advise that:
`idempotent <https://stackoverflow.com/a/1077421/3332416>`_: they must not
cause side-effects if they are started more often than expected.

Why are the installed Python libraries different from Odoo's own requirements.txt?
----------------------------------------------------------------------------------

On Odoo.sh, Odoo uses the Python libraries available in the Linux distribution
to fulfill its dependencies. Odoo is compatible with the packages in Debian
stable and Ubuntu LTS releases. The `requirements.txt <https://github.com/odoo/odoo/blob/master/requirements.txt>`_
Comment on lines +36 to +38
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
On Odoo.sh, Odoo uses the Python libraries available in the Linux distribution
to fulfill its dependencies. Odoo is compatible with the packages in Debian
stable and Ubuntu LTS releases. The `requirements.txt <https://github.com/odoo/odoo/blob/master/requirements.txt>`_
On Odoo.sh, Odoo uses the Python libraries available in the Linux distribution to fulfill its
dependencies. Odoo is compatible with the packages in Debian stable, and Ubuntu LTS releases.
The `requirements.txt <https://github.com/odoo/odoo/blob/master/requirements.txt>`_

included with Odoo is intended for use on different distributions where the
same library versions might not be available. As a result, Odoo.sh does not use
Odoo's own requirements.txt file and there might be occasional differences
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Odoo's own requirements.txt file and there might be occasional differences
Odoo's own :file:`requirements.txt` file, and there might be occasional differences

between them.

For example, reportlab 3.5.34 is the version available on Ubuntu 20.04 as a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably best with a custom "example" admonition for better readability. (note that a new "example" admonition should be added soon)

Suggested change
For example, reportlab 3.5.34 is the version available on Ubuntu 20.04 as a
.. admonition:: example
Reportlab 3.5.34 is the version available on Ubuntu 20.04 as a

distribution package. That distribution uses Python 3.8, in which case
requirements.txt in `Odoo 14.0 <https://github.com/odoo/odoo/blob/2097c75dc38b310c4d9ddecd79e2218448a51a4c/requirements.txt#L46>`_
specifies reportlab 3.5.55. Normally speaking the pin in requirements.txt
should reflect that and be 3.5.34, but it turns out that this version only
works if Ubuntu's patches are applied to it. Ubuntu LTS releases have
backporting of bug fixes, which means that the behavior of a Python package in
the distribution might not be the same as that same version when installed with
pip. This is the case with reportlab, which is why the pin is different.

If a custom module requires a more recent version of a package than is
installed on Odoo.sh, you can specify it in your own requirements.txt file.
Comment on lines +54 to +55
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I guess this could be written as a tip
  • new phrasing suggestion
  • "file" directive
Suggested change
If a custom module requires a more recent version of a package than is
installed on Odoo.sh, you can specify it in your own requirements.txt file.
.. tip::
If a custom module requires a package version more recent than the one installed on Odoo.sh, you
can specify it in your :file:`requirements.txt` file.