Plone 6: Drop Python 3.6 and 3.7, add support for Python 3.9
It is easy to install and use Python 3.8 these days on all platforms.
System Python might be not enough on some older systems to run Plone. Debian Buster comes with 3.7, but Ubuntu 20.04LTS comes with 3.8 and next Debian release bullseye is already in freeze since Jan 12th 20221, coming with 3.9.
Lets see if this is fine, poll at https://community.plone.org/t/plone-6-python-version-support/13353/2
For an overview, all dates for active Python releases can be found at the top of https://www.python.org/downloads/
I would add that a new major Python version is released each year now. Python 3.10 is expected in October this year, see PEP 619. Somewhere in the Plone 6 lifecycle we should start supporting it. I expect we have Plone 6.0 before October, so we won't have support for 3.10 then yet.
I agree it makes sense to restrict the amount of Python versions we support and test. For 5.2 we support four versions, and that is really a lot. Cannot do much about that in 5.2 though. I would say supporting two or three major versions is the maximum. But with a new Python version each year, we could easily find ourselves wanting to support more...
We could say:
In 6.0 I am +1 for dropping 3.6, +0.5 for dropping 3.7, +1 for adding 3.9.
But yes, the poll is a good idea.
As a matter of fact, python 3.9 is already on jenkins workers, I did not manage to find the time to make the last stitch and create the jobs to run against 3.9. Do we have a place where we have the matrix of plone release series and their expected support of python versions? :thinking: or we should run tests for 5.1 and 5.2 from 3.6 onwards to any newer python version that comes?
I think we manage the supported versions in the trove classifiers of Products.CMFPlone.
Do we have a place where we have the matrix of plone release series and their expected support of python versions?
We have the release schedule.
or we should run tests for 5.1 and 5.2 from 3.6 onwards to any newer python version that comes?
5.1 can be dropped, see also the release schedule.
(BTW, all firefox tests could also be dropped, or maybe made invisible, or not on the main Jenkins screen.)
5.2 still needs 2.7 as well.
For the rest we should probably follow what Zope supports, see for example the Python versions in tox.ini on Zope 4.x for Plone 5.2, and Zope master for Plone 6.
We can be stricter than Zope. For example Zope 4.x supports Python 3.5, which Plone does not.
We can be stricter than Zope.
I think yes, we should be.
This was the result from the community poll:

No votes for Python 3.6. One third still votes for 3.7.
@plone/framework-team Looks like something to discuss in a team meeting.
Just for fun I made a small script:
https://gist.github.com/ale-rt/76a9d44fcc411ca9ddef60315b37c39b
Provided it is correct and valid, OOB the following distro (between the 100 most popular) do not support 3.8.
1 MX Linux
10 Solus
14 deepin
29 EasyOS
33 Tails
41 Endless OS
43 GhostBSD
49 PureOS
58 Raspberry Pi OS
70 KNOPPIX
72 AV Linux
77 Elive
78 BunsenLabs Linux
87 ExTiX
90 NomadBSD
97 Clear Linux
98 Netrunner
Anyway I bet it is fairly easy to install Py3.8 there.
BTW I can't see any killer feature we have in Python > 3.7 that will make us want to drop support for Python 3.7.
Anyway I will submit the question to the @plone/framework-team :)
Current outcome for Plone 6 Python versions:
python 3.9 is installed on jenkins workers, I need to update the YAML file that generates all jobs for it. Should we remove 3.6 then? Or that meeting should happen first?
I have sent an email to by @plone/framework-team fellows, so far I got no news. I will keep you posted!
@jensens sounds like a sensible plan to me. Again, thanks @jensens for taking care of this!
Just an update from our side regarding my previous comments on the matter. We are currently migrating all our servers to the latest Ubuntu 20.04 with Python 3.8 and making this the default for all our Plone installations. Though, Ubuntu 18.04 is still supported until 2023 with Python 3.7 as default. Not sure about the Debian schedule and other distros. So if we can keep 3.7 without too much hassle that might help people.
I added a few 3.9 jobs on jenkins, please give them a try :+1:
Do you know about https://github.com/zopefoundation/ZEO/issues/165? Did anyone have problems with ZEO and Python 3.8 or are these just test failures?
I have quite a lot of websites running Python 3.8/Plone 5.2.3 (ZEO-5.2.2) and did not see any particular issue.
I only had some issues with zc.zrs (which AFAIK requires https://github.com/zopefoundation/zc.zrs/pull/7).
I have sent an email to by @plone/framework-team fellows, so far I got no news. I will keep you posted!
Still I have no news... :disappointed:
I added a few 3.9 jobs on jenkins, please give them a try
@gforcada and @plone/testing-team can you activate the Plone 6 jobs to run automatically?
We had a PR on plone.staticresources that broke the Plone 6 jobs. Luckily it was easy to fix https://github.com/plone/plone.staticresources/pull/139 but we should prevent this to happen again.
that's work that needs to be done at mr.roboto, I can't remember what was the status right now, I will have to have a look, the code is public though, so MR are welcome
that's work that needs to be done at mr.roboto, I can't remember what was the status right now, I will have to have a look, the code is public though, so MR are welcome
I added a separate issue here: https://github.com/plone/Products.CMFPlone/issues/3270
Most helpful comment
@jensens sounds like a sensible plan to me. Again, thanks @jensens for taking care of this!
Just an update from our side regarding my previous comments on the matter. We are currently migrating all our servers to the latest Ubuntu 20.04 with Python 3.8 and making this the default for all our Plone installations. Though, Ubuntu 18.04 is still supported until 2023 with Python 3.7 as default. Not sure about the Debian schedule and other distros. So if we can keep 3.7 without too much hassle that might help people.