Run `mach mozregression` with Python 3
Categories
(Firefox Build System :: General, task, P3)
Tracking
(firefox76 fixed)
| Tracking | Status | |
|---|---|---|
| firefox76 | --- | fixed |
People
(Reporter: ahal, Assigned: wlach, Mentored)
References
Details
Attachments
(2 files)
The mozregression module is Python 3 compatible and the mach wrapper around it is very thin. We should be able to enable it under Python 3 fairly easily.
To do so, remove "mozregression" from the whitelist in the root "mach" driver. Then run ./mach mozregression with various arguments to test that everything is working.
Updated•5 years ago
|
| Assignee | ||
Comment 1•5 years ago
|
||
Hmm, making the necessary change and then running ./mach mozregression --help I get the attached error. The salient part seems to be:
Error running mach:
['mozregression', '--help']
The error occurred in mach itself. This is likely a bug in mach itself or a
fundamental problem with a loaded module.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.
If filing a bug, please include the full output of mach, including this error
message.
The details of the failure are as follows:
File "/Users/wlach/src/mozilla-unified/third_party/python/configobj/configobj.py", line 1644
except Exception, e:
^
SyntaxError: invalid syntax
It does indeed look like our copy of configobj in third_party is very old, probably not supporting python 3. :ahal do you know why this hasn't been a problem so far? Can we just upgrade the files in the tree?
FWIW if I revert my change everything works fine.
| Reporter | ||
Comment 2•5 years ago
|
||
Yeah, we can just upgrade them. You could run mach vendor python configobj==5.0.6 to do so.
However it looks like this is literally the only use of configobj in all of m-c:
https://searchfox.org/mozilla-central/source/config/printconfigsetting.py#21
So maybe we should just remove it from m-c entirely and then we can install it at runtime when running mach mozregression (just like we install mozregression itself at runtime there). This is definitely follow-up fodder.
Also worth pointing out that even configobj==5.0.6 is from 2014, so maybe mozregression should try to go back to the stdlib configparser or something else too.
| Assignee | ||
Comment 3•5 years ago
|
||
(In reply to Andrew Halberstadt [:ahal] from comment #2)
Also worth pointing out that even
configobj==5.0.6is from 2014, so maybe mozregression should try to go back to the stdlib configparser or something else too.
Yeah I think that makes sense once we've moved mozregression to py3-only (currently it supports both py2 and py3 in parallel).
I'll do up a new bug to upgrade configobj. Thanks!
| Assignee | ||
Comment 4•5 years ago
|
||
(In reply to William Lachance (:wlach) (use needinfo!) from comment #3)
(In reply to Andrew Halberstadt [:ahal] from comment #2)
I'll do up a new bug to upgrade
configobj. Thanks!
Actually looking at it, just modifying printconfigsetting might be just as easy...
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 5•5 years ago
|
||
Works great now that bug 1623132 has landed.
| Assignee | ||
Comment 6•5 years ago
|
||
Comment 8•5 years ago
|
||
| bugherder | ||
Description
•