Use "hg" with Python 3 instead of Python 2
Categories
(Firefox Build System :: MozillaBuild, task, P3)
Tracking
(Not tracked)
People
(Reporter: mhentges, Assigned: mhentges)
References
Details
Attachments
(2 files)
Mercurial 6.0 is the last release to support Python 2.
However, there's an outstanding bug with Mercurial and MSYS environments where the pager won't work (so, hg config ..., hg show ..., etc will just immediately exit without printing anything).
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 2•4 years ago
|
||
Ooh, Alex's recent findings on a ./mach show-log issue have uncovered the PYTHONLEGACYWINDOWSSTDIO environment variable, which works around this very problem.
| Assignee | ||
Comment 3•4 years ago
|
||
The blocking "no output pager" bug is worked around by
using hg.exe instead of the text-based hg executable.
Work around this with an alias, and move Mercurial setup to Python 3.
Depends on D136414
| Assignee | ||
Comment 4•4 years ago
|
||
Python 2 is no longer needed now that Mercurial is used with Python 3.
Depends on D136415
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
| Assignee | ||
Updated•4 years ago
|
Pushed by mhentges@mozilla.com:
https://hg.mozilla.org/mozilla-build/rev/71bb2c60bade
Use Mercurial with Python 3 r=glandium
https://hg.mozilla.org/mozilla-build/rev/6365f1810e5a
Remove Python 2 r=glandium
Note on that: Python 3.9 does not support Windows 7.
You probably don't care enough to revert to 3.8 (which would be very nice), but at least mention it on the Wiki page.
Theoretically it should work with https://github.com/nalexandru/api-ms-win-core-path-HACK but at least for me, mach bootstrap freezes at the "Please choose the version of Firefox you want to build" step and then crashes with
OSError: [WinError 8] Not enough memory resources are available to process this command
File "M:\x\mozilla-source\mozilla-release\python\mozboot\mozboot\mach_commands.py", line 43, in bootstrap
bootstrapper.bootstrap(command_context.settings)
File "m:\x\mozilla-source\mozilla-release\python\mozboot\mozboot\bootstrap.py", line 273, in bootstrap
prompt_choice = self.instance.prompt_int(
File "m:\x\mozilla-source\mozilla-release\python\mozboot\mozboot\base.py", line 567, in prompt_int
choice = input(prompt)
And memory should not really be an issue, I have 5 GB of available RAM and there is no spike in usage at all.
This seems to be some issue with the input() command. If I change mozilla-release\python\mozboot\mozboot\base.py to not have the input, but instead just return what I would have selected, it runs fine.
Updated•3 years ago
|
Description
•