configure/lint code must support Python 3
Categories
(Firefox Build System :: General, task)
Tracking
(firefox77 fixed)
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: rstewart, Assigned: glandium)
References
Details
Attachments
(1 file)
The configure lint code (see lint.py and related files) doesn't support Python 3 and -- even worse -- is tied directly to the Python bytecode spec and lower-level modules like dis
and inspect
. Due to this it's difficult to port to Python 3 without breaking things or introducing bugs and it's especially difficult to make a version of this code that works properly under both Python 2 and 3, which is a part of the migration to Python 3. Due to how the code is structured, migrating python/mozbuild is blocked on this.
Luckily the actual build process doesn't seem to depend on these files, so instead of being ported they could be deleted, or the unit tests could be disabled until the Python 3 migration is complete (at which point we can update the lint to work under Python 3 at some point in the future).
Reporter | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
•
|
||
migrating python/mozbuild is blocked on this.
How so? Nothing imports the lint code under mozbuild.configure other than the lint tests, and those can happily be the last bits to stay in mozbuild/test/python2.ini.
Reporter | ||
Comment 2•4 years ago
•
|
||
Sure they can, but we won't be able to close bug 1388447 or remove Python 2 support from mozbuild
while these lint tests exist and are run in automation -- i.e. migrating python/mozbuild to Python 3 is blocked. We'll always be in the limbo between Py2 and Py3 while this is a thing. I agree there's no particular urgency, if that's what you're getting at.
Assignee | ||
Comment 3•4 years ago
|
||
I thought you were saying it was blocking moving other mozbuild stuff. Thanks for the clarification. So this means we can just convert the code to python 3 once everything else is done, and avoid having to make it compatible to both python 2 and python 3, although I suspect it wouldn't be that hard.
Assignee | ||
Comment 4•4 years ago
|
||
How far off is the rest of mozbuild?
Reporter | ||
Comment 5•4 years ago
|
||
We're getting there. We're maybe a third of the way there. I bet it'll be at least a month before we actually get to the point where we can start making ./mach build
or ./mach configure
or ./mach bootstrap
run in Python 3.
Assignee | ||
Comment 6•4 years ago
|
||
Support for python 2 is completely dropped. It wouldn't be too much code
to support both python 2 and 3 but since configure is going to switch to
python 3 shortly after, it's not worth the effort.
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/b7d4ff29805d Switch python configure lint to python 3. r=rstewart
Comment 8•4 years ago
|
||
bugherder |
Description
•