[meta] Support and Require Python 3 to build Firefox
Categories
(Firefox Build System :: General, enhancement)
Tracking
(firefox57 wontfix)
Tracking | Status | |
---|---|---|
firefox57 | --- | wontfix |
People
(Reporter: gps, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: meta)
Comment 1•7 years ago
|
||
Reporter | ||
Comment 2•7 years ago
|
||
Reporter | ||
Comment 3•7 years ago
|
||
Comment 4•7 years ago
|
||
Comment 5•7 years ago
|
||
Reporter | ||
Comment 6•7 years ago
|
||
Reporter | ||
Updated•7 years ago
|
Reporter | ||
Comment 7•7 years ago
|
||
Reporter | ||
Comment 8•7 years ago
|
||
Reporter | ||
Comment 9•7 years ago
|
||
Comment 10•7 years ago
|
||
Comment 11•7 years ago
|
||
Comment 12•7 years ago
|
||
Comment 13•7 years ago
|
||
Reporter | ||
Comment 16•7 years ago
|
||
Updated•7 years ago
|
Reporter | ||
Comment 17•7 years ago
|
||
Reporter | ||
Comment 18•7 years ago
|
||
Comment 19•7 years ago
|
||
Comment 20•7 years ago
|
||
Comment 21•7 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 22•5 years ago
|
||
(In reply to Gregory Szorc [:gps] from comment #17)
I believe we decided our minimum version should be 3.5.
This comment was posted over a year ago. Does anyone know if this is still the case? I'd love to target 3.6 as a minimum version. I don't think it's too terrible to ask users of older distros to add a PPA. Or if that isn't acceptable, we could download and setup an installation for them in ~/.mozbuild
as part of bootstrap and have mach
look there first.
It's also worth noting that machines in CI seem to be using 3.7
. We'll want to downgrade them to whatever we decide our minimum is.
Comment 23•5 years ago
|
||
raptor in CI might require 3.7, if we downgrade this could affect automation and tools that rely on python 3 currently.
:rwood, do you know about python 3 requirements for raptor and mitmproxy? (and is this changing for browsertime)?
Comment 24•5 years ago
|
||
(In reply to Joel Maher ( :jmaher ) (UTC-4) from comment #23)
raptor in CI might require 3.7, if we downgrade this could affect automation and tools that rely on python 3 currently.
:rwood, do you know about python 3 requirements for raptor and mitmproxy? (and is this changing for browsertime)?
I don't know offhand re: Python 3.x for raptor/mitmproxy sorry, :bebe do you know (or can you look into that please), thanks! There are alot of mozharness/mozbase dependencies that Raptor uses.
Nick, do you know off hand re: Python 3 and browsertime? Thanks!
Updated•5 years ago
|
Comment 25•5 years ago
|
||
This bug is probably the wrong place to get into details on specific use cases.
In general, our tools should try to support the same version of Python that the build system does. If they don't they should be modified to add support. If for some reason that's not possible, I'm sure the occasional exception can be made.
Note downgrading in CI doesn't necessarily mean removing 3.7
, but adding the lower version and making sure we use that by default in our tasks.
Comment 26•5 years ago
|
||
:rwood as you stated earlier Raptor has a some non-python 3 dependency in mozharness and mozbase. Raptor itself is python 3 ready.
For mitmproxy it is build and requires python 3 to run from the python package so no worries there
Comment 27•5 years ago
|
||
(In reply to Robert Wood [:rwood] from comment #24)
(In reply to Joel Maher ( :jmaher ) (UTC-4) from comment #23)
raptor in CI might require 3.7, if we downgrade this could affect automation and tools that rely on python 3 currently.
:rwood, do you know about python 3 requirements for raptor and mitmproxy? (and is this changing for browsertime)?
I don't know offhand re: Python 3.x for raptor/mitmproxy sorry, :bebe do you know (or can you look into that please), thanks! There are alot of mozharness/mozbase dependencies that Raptor uses.
Nick, do you know off hand re: Python 3 and browsertime? Thanks!
I really don't know much about Python 3 compatibility or requirements. There is essentially no browsertime-specific Python code at this time, and what we add can be made Python 3 compatible quite easily I'm sure (assuming, I guess, minimal support for actually running with Python 3 in CI, which all seems to be moving smoothly).
So if the Raptor harness and the underlying mozbase
code is Python 3 ready, I don't think browsertime will get in the way at all.
Comment 28•5 years ago
|
||
The Linux builds on automation are using python 3.5. I think it's fair to maybe require a newer version for tests, but we should at least keep 3.5 for the build system.
I don't think it's too terrible to ask users of older distros to add a PPA. Or if that isn't acceptable, we could download and setup an installation for them in ~/.mozbuild as part of bootstrap and have mach look there first.
Actually, neither is really acceptable downstream (especially the second) ; FWIW, distros with ongoing support do come with python 3.5.
Comment 29•5 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #28)
The Linux builds on automation are using python 3.5. I think it's fair to maybe require a newer version for tests, but we should at least keep 3.5 for the build system.
I don't think it's too terrible to ask users of older distros to add a PPA. Or if that isn't acceptable, we could download and setup an installation for them in ~/.mozbuild as part of bootstrap and have mach look there first.
Actually, neither is really acceptable downstream (especially the second) ; FWIW, distros with ongoing support do come with python 3.5.
Well, it depends of the distro, but for the main server ones in their latest version, it's greater versions:
Ubuntu, 3.6 on LTS, 3.7 on stable (https://packages.ubuntu.com/search?suite=default§ion=all&arch=any&keywords=python3&searchon=names)
Debian buster is on 3.7 (https://packages.debian.org/buster/python3), which is now the latest stable since a week
Latest RHEL seems to be 3.6 (https://developers.redhat.com/blog/2018/11/14/python-in-rhel-8/)
Comment 30•5 years ago
|
||
Ubuntu Xenial, still supported until 2021, has python3.5 and doesn't have greater versions.
Debian stretch, still supported until 2020 officially, 2022 LTS, has python3.5, and doesn't have greater versions.
Comment 31•5 years ago
|
||
My bad, thought the question was whether greater versions were available or not on those distros.
Comment 32•5 years ago
•
|
||
(In reply to Mike Hommey [:glandium] from comment #28)
The Linux builds on automation are using python 3.5. I think it's fair to maybe require a newer version for tests, but we should at least keep 3.5 for the build system.
Sounds good. The downside to using a different version for non-build things is that people might get used to using e.g f-strings and accidentally add one to a shared library that the build uses (e.g mozbase). Not a huge deal as it will get backed out, but could still be annoying.
Whether or not we standardize on a single Python version, we'll need to make sure the unittests for various modules are all running with the minimum version they need to support.
(In reply to Mike Hommey [:glandium] from comment #28)
Actually, neither is really acceptable downstream (especially the second) ; FWIW, distros with ongoing support do come with python 3.5.
Ubuntu 14.04 LTS (eol April 2022), seems to come with 3.4. By that logic shouldn't 3.4 be the minimum? Also 16.04 eol is 2024. Will the build system be stuck on 3.5 for another 5 years? If that's the case, then yeah.. maybe it would be better to use a more modern version for non-build things in the meantime.
Updated•5 years ago
|
Comment 33•4 years ago
|
||
We both 1) support and 2) require Python 3 to build Firefox today. I'm closing this bug as complete in light of that.
Description
•