odoo / docker

Other
931 stars 1.51k forks source link

python 3.11 or newer? #472

Open psy0rz opened 8 months ago

psy0rz commented 8 months ago

According to release notes:

Python 3.11 is between 10-60% faster than Python 3.10. On average, we measured a 1.25x speedup on the standard benchmark suite. See Faster CPython for details.

The official container still uses python 3.9.

Are there plans to upgrade this? For example by switching to debian bookworm as base image?

Also: Would it be possible to just use alpine or the docker python image as base image? Or is there stuff that needs a debian environment?

ludovic-gasc commented 8 months ago

Hi @psy0rz ,

I can answer you about this question:

Would it be possible to just use alpine or the docker python image as base image? Or is there stuff that needs a debian environment?

Odoo depends on the wkhtmltopdf package to be able to generate PDFs, and it's packaged for Debian: https://github.com/odoo/docker/blob/master/16.0/Dockerfile#L36

And it must be the binary package generated from wkhtmltopdf, because the package in the Debian repository has some limitations.

psy0rz commented 8 months ago

ahhh right that makes sense.

abdelghani-djef commented 8 months ago

ahhh right that makes sense.

hi, you can create your own image with any python version and check if it works, i can help you if you want to.

headkit commented 6 months ago

any news here?

lathama commented 3 months ago

@psy0rz the current Odoo 17 is built on Ubuntu Jammy and the supported Python is 3.10 as noted at https://packages.ubuntu.com/jammy/amd64/python3

If you need to use Python 3.11+ today it would be wise to build your own docker image. Debian Bookworm for example uses 3.11 and you could edit the Dockerfile and try it today.