freedomofpress / dangerzone

Take potentially dangerous PDFs, office documents, or images and convert them to safe PDFs
https://dangerzone.rocks/
GNU Affero General Public License v3.0
3.35k stars 152 forks source link

build: bump the minimum python version to 3.9 #818

Closed almet closed 4 weeks ago

almet commented 1 month ago

Bump the minimum python version to 3.9 when installing from source, and to 3.8 when installing in Debian-related distributions.

The minimum python version when installing from source is now python 3.9, as Pyside6 6.7.1 dropped support for python 3.8 (see https://github.com/freedomofpress/dangerzone/issues/780 for more information).

On Debian-derivatives distributions, the minimum Python version is now set to 3.8. In practice, because Pyside6 is not packaged for Debian, we use Pyside2 [0], which is why we can relax the python version requirement.

In practice, when installing from source on an environment where python3.9 is not the default python, poetry will look for it and use it if available

For various reasons, this Python version might not be compatible with the python range supported by the project. In this case, Poetry will try to find one that is and use it.

Poetry docs

On Ubuntu Focal (20.04) where Python 3.9 is not installed by default, it is possible to install it using the python3.9 package.

[0] More information on how Pyside6 packaging affects dangerzone on https://github.com/freedomofpress/dangerzone/issues/221 [1] See the current status of Pyside6 packaging