mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 02:40:22 -10:00
Credit: mars for making the shell POSIX compliant This embeds a blacklist of every mach command that needs to run with Python 2 directly in the mach driver itself. Initially this is every mach command. We then use a bit of shell to determine whether the command being run needs Python 2 or 3. While this approach may seem a bit hacky, it has several benefits: 1. No need to add complex machinery in mach's registration code. 2. No need to spawn two separate Python interpreters in the event a different Python from the original interpreter is needed. 3. Perf impact is negligible. 4. New commands are Python 3 by default. It is also only a temporary hack. Once all commands are running with Python 3, we can revert back to the original mach driver. Differential Revision: https://phabricator.services.mozilla.com/D36103
This directory contains common Python code. The basic rule is that if Python code is cross-module (that's "module" in the Mozilla meaning - as in "module ownership") and is MPL-compatible, it should go here. What should not go here: * Vendored python modules (use third_party/python instead) * Python that is not MPL-compatible (see other-licenses/) * Python that has good reason to remain close to its "owning" (Mozilla) module (e.g. it is only being consumed from there). Historical information can be found at https://bugzilla.mozilla.org/show_bug.cgi?id=775243 https://bugzilla.mozilla.org/show_bug.cgi?id=1346025