rfcs icon indicating copy to clipboard operation
rfcs copied to clipboard

Update minimum supported Python to 3.9

Open whimboo opened this issue 1 year ago • 12 comments

As of now the minimum supported version of Python for web-platform tests is Python 3.8. Given that this release is supported until October 2024 we should start planning to get rid of it and use at least version 3.9 which gets security updates until October 2025.

Right now such a bump would be blocked at least from Mozilla side because the wpt tests are still running on workers which have Python 3.8 installed. But over the last months newer images have been created with Python 3.10 installed and those are getting slowly rolled out. There is specifically bug 1865353 for web-platform tests.

I'm filing this as issue for now to get feedback from other vendors regarding their requirements and possible blockers. I assume that we want to keep support for all available Python versions or should we even consider bumping the minimum version to 3.10? Feedback is welcome.

CC @jgraham, @foolip, @jcscottiii, @gsnedders, @Ms2ger

whimboo avatar Jun 25 '24 06:06 whimboo

I assume that we want to keep support for all available Python versions or should we even consider bumping the minimum version to 3.10?

Both the macOS Ventura and Sonoma aligned Xcode releases, Xcode 14 & 15, ship with Python 3.9 — and WebKit needs to be buildable and testable with them until support for both OSes is dropped.

gsnedders avatar Jun 25 '24 23:06 gsnedders

Apparently we need to support 3.8 for as long as Ubuntu does, which is expected to be some time in 2025.

jgraham avatar Jul 02 '24 13:07 jgraham

To extend on what James wrote the Ubuntu 20.04 LTS release is using Python 3.8.2 and will reach its end of life in April 2025.

whimboo avatar Jul 02 '24 20:07 whimboo

@past can you give feedback about this for Chromium?

foolip avatar Jul 05 '24 14:07 foolip

As far as I can tell Chromium CI is using Python 3.11. @WeizhongX can you confirm?

past avatar Jul 08 '24 09:07 past

Unfortunately Chromium CI is using python 3.8.

WeizhongX avatar Jul 27 '24 15:07 WeizhongX

Update: we are starting to migrate to python 3.11. So this will be fine for us once that is done.

WeizhongX avatar Aug 12 '24 22:08 WeizhongX

Note we have actually already partially broken Python 3.8: https://github.com/web-platform-tests/wpt/commit/bbf5d493a85bdfa2c78b5a667f133ff1f8972a53 (from #44005) bumped Sphinx in docs/requirements.txt to 7.2.6, but https://github.com/sphinx-doc/sphinx/commit/ad61e4115776846b917f0a0f0a0bedbc06d6e1a3 dropped support for Python 3.8 in Sphinx 7.2.0.

gsnedders avatar Nov 02 '24 23:11 gsnedders

Note we have actually already partially broken Python 3.8: web-platform-tests/wpt@bbf5d49 (from #44005) bumped Sphinx in docs/requirements.txt to 7.2.6, but sphinx-doc/sphinx@ad61e41 dropped support for Python 3.8 in Sphinx 7.2.0.

@sadym-chromium given that you landed that related PR would you mind taking a look?

whimboo avatar Nov 04 '24 09:11 whimboo

It's surprising that we just noticed breakage introduced 10 months ago. Which job is currently broken and in which CI?

past avatar Nov 04 '24 17:11 past

@sadym-chromium given that you landed that related PR would you mind taking a look?

https://github.com/web-platform-tests/wpt/pull/48947/commits/274f7b8c423252d6ce13ce5bc3bd86e3da0b83c5 has a fix for this (albeit on a much larger PR); I hadn't bothered pulling it out because it is kinda niche, but I probably should when I have a moment.

It's surprising that we just noticed breakage introduced 10 months ago. Which job is currently broken and in which CI?

We basically only run the documentation build on Linux on Python 3.12, then whatever people run it on locally, so it's not super surprising that it went unnoticed.

gsnedders avatar Nov 04 '24 18:11 gsnedders

Both the macOS Ventura and Sonoma aligned Xcode releases, Xcode 14 & 15, ship with Python 3.9 — and WebKit needs to be buildable and testable with them until support for both OSes is dropped.

@gsnedders Couldn't webkit install a newer python version on their build boxes? Is there some reason why they need to run using system Python? Python 3.8 is 5 years old at this point! And trying to get keep old Python versions to work on newer versions of macOS is pretty painful (in particular when using 3rd-party modules which will only support newer OS versions in versions that have dropped support for older Python versions), and is a significant hurdle to onboarding new contributors to Servo.

More generally, I wonder whether WPT would consider (gradually) moving it's tooling away from Python entirely? Python's backwards compatibility guarantees and dependency management are awful and the only reason why we're having this conversation.

nicoburns avatar Dec 05 '24 20:12 nicoburns

To extend on what James wrote the Ubuntu 20.04 LTS release is using Python 3.8.2 and will reach its end of life in April 2025.

Standard support will actually end on 2025-05-29. I assume this is the relevant date for our removal in wpt, and that we're not concerned with the extended support, which runs until 2030-04-23.

whimboo avatar Apr 14 '25 11:04 whimboo

I assume this is the relevant date for our removal in wpt

No, the relevant date is when consumers no longer require 3.8 support (that could be earlier than the official support date, but is typically later since upgrading browser build systems and CI is often slow).

jgraham avatar Apr 14 '25 13:04 jgraham