FYI: `mach python-test` API change

If you never use `mach python-test`, you can stop reading now.

At the latest version of mozilla-central, `mach python-test` no longer take=
s a `--python` command-line argument. If you're used to using it, you have =
alternatives:

* If you're used to doing `./mach python-test --python 3 ...`, you can stop=
 passing `--python 3` entirely. Python 3 is the default.

* If you're used to doing `./mach python-test --python 2 ...`, you can do `=
MACH_PY2=3D1 ./mach python-test ...` instead. The MACH_PY2 environment vari=
able will tell mach to use Python 2 instead. (MACH_PY2 only works with pyth=
on-test, so don't just unconditionally set it in your bashrc or something.)

* If you're used to doing `./mach python-test --python $PATH_TO_A_PYTHON_BI=
NARY ...`, you can do `$PATH_TO_A_PYTHON_BINARY ./mach python-test ...` ins=
tead.

If you're wondering why this change was made: under the hood, python-test u=
sed to use pipenv and would pass the --python command-line argument to pipe=
nv when creating its virtualenv. pipenv was determined to be too heavyweigh=
t for this purpose, and migrating away from it significantly reduced our ma=
intenance burden. As a nice side effect, you'll notice that the startup tim=
e of `mach python-test` is significantly improved.

If you have any questions about this, please let me know.

Ricky
0
Ricky
9/2/2020 10:27:34 PM
mozilla.dev.platform 6635 articles. 0 followers. Post Follow

0 Replies
15 Views

Similar Articles

[PageSpeed] 13

Reply: