I am in favor of upgrading at least to 3.10 has Union typing is quite usefull and will remove a lot of call to typing library which is a little old fashioned.
I would advocate for 3.11 as it is the latest version that switched to "security" mode according to the version management board: https://devguide.python.org/versions/
I am not sure but it seems that Python3.9 is available for Ubuntu 20.04.6 LTS but neither Python3.10 or Python3.11. If it is the case, I think that the minimum Ubuntu version would be 22.04 or 24.04 for using Python3.10 or Python3.11.
Though in term of dependency, I think that it's a good think to support at any time a mainstream distro such a Ubuntu at Last-1 stable version at least for 1-2 year waiting for users to upgrade.
For instance I think it's too cumbersome to impose in 2024 a Ubuntu 24.
A simple choice as Ubuntu release a stable version every 2 years could be to support at anytime the Last and Last-1. I.e Ubuntu 22 and 24, then 24 and 26, etc... Said otherwise 4 years support.
An alternative is to say: Last and Last-1 during a year after the Last version is out. I.e. Ubuntu 22 and 24. then in 04/25 Ubuntu 24 only, then in 04/26 Ubuntu 24 and 26, etc... Said otherwise 3 years support.
Back to the discussion, actually what I suggest is to support Ubuntu 22 at least for 1 year, or at best up to Ubuntu 26 is out, meaning that:
we require support for python >= 3.10
and gcc >= 11.4
At least drop support for python 3.7 (even Ubuntu 20 as python 3.8).
Note that there is currently an issue with the pip packaging on 3.8 (due to type hints), It could be interesting to decide before fixing it.
What bothers me is that some users may not be familiar with conda or installing a new python version.
And I think we should support LTS ubuntu versions. So it would means living with 20.04 until
April 2025. But maybe we should just accept Last & Last-1 as proposed by @cguillon.
Anyhow I think we should write dependencies in our README and documentation as proposed by @gregkub
Agreed for documenting the required version, though I think it's already done somewhere because I remembered reading that it was >=3.7.
@gregkub note for the documentation that using pyenv is useful for installing virtualenvs with dedicated python versions.
@cmoineau I don't think I used 3.8 stuff which were not in 3.7. Really the useful upgrades were 3.9 and 3.10 which completes type hints support.
W.r.t. the LTS discussion, I'm not sure we should as a principle align on lifecycles of the distros themselves (i.e. 5 years for instance for Standard Ubuntu LTS). For instance in the industry, a Ubuntu LTS PRO support for 10 years is expected. I.e. they may have LTS installation of Ubuntu 16.04 for instance, this does not mean that they expect all software installed on top of the distribution to be supported that long. In these cases either they do not update or they install compatible environments above the base distro.
Though ensuring that we support the previous LTS for some time in addition to the very last is important imo.
The difference is that we have then to align on the frequency of the LTS releases (i.e. not less than 2 years), but not the lifetime of each releases.
I do not mean we should not support 5 years. Just I think we should have the choice for instance:
3 years (1 year overlap for Last-1 and Last),
4 years (always Last-1 and Last),
5 years (support 2 or three LTS on even years),
etc...
This is the lifetime of our support for Ubuntu LTS version xxx. It's not directly related to python version but it's important to check I guess. For instance in CI jobs, it's not useful to use an 24.04 image if we are supposed to support 20.04. Then it puts a basis on the minimal tools version which simplify things.
Note though that there are other possible choices, for instance pytorch requires python >=3.9, which is neither in Ubuntu 20.04 (3.8), nor Ubuntu 22.04 (3.10).
Here a user experience: Since the addition of the last developments on the dev branch, I was no more able to run the simplest script, i.e. importing Aidge core. The best I succeeded to do was to update WSL2 with Ubuntu 22.04 LTS (Jammy Jellyfish). I installed Python 3.10 and 3.11 and build two virtual environments one for each Python. I succeeded to run my Aidge scripts, in the environment with Python 3.10 but not in the environment with Python 3.11. The problem with the environment 3.11 is not due to Aidge but to an incomplete Python installation...
In conclusion, on my side I can't do better than Ubuntu 22.04 with Python 3.10.