Upcoming Python-related changes

4 views
Skip to first unread message

Dirk Pranke

unread,
Apr 14, 2021, 7:45:42 PM4/14/21
to chromium-dev, Norman Rosas, Normando Rosas

Hi all,

We're due for an update on various Python-related efforts in chromium/src, so here goes ...

First, I landed attempt #8 of flipping the compile to use Python3 by default instead of Python2 yesterday. I am somewhat
optimistic that this one will stick, as attempt #7 lasted for a week before being reverted due to minor issues. We will
surely find more, but we're increasingly in a mode of filing and fixing the issues rather than just reverting back to Py2.

Second, nearly all of the blocking work for migrating other things to Python3 has been done, and so we can really start working on things in parallel now. There are a lot of TODOs filed for individual build scripts to be updated, and various teams are signing up to port the larger frameworks (like telemetry and blink_web_tests) in Q2. We even have someone dedicated to helping us wrangle all these efforts [ thank you @Norman Rosas ! ] so we're definitely picking up speed.

Third, while we still rely on `python` being in $PATH (and being a Python2 interpreter), we increasingly rely on `python3` being in $PATH as well. Make sure you have both, either via OS-specific means, or by adding depot_tools/python2-bin and/or depot_tools/python3-bin to your PATH to get the versions we're bundling with depot_tools. We should be moving to only referencing `python3` going forward, but there's a good distance to go before we no longer need python2 anywhere.

Fourth, we will increasingly be making depot_tools only reference python3 internally, and making it reference the version we're bundling explicitly, to be hermetic. This may cause issues for platforms that don't have CIPD-supplied binaries. We can add bypass mechanisms for that if we need to, but we haven't yet.

I will (hopefully) be updating some of the docs on Python to reflect this soon, but I wanted to get this out now as some of the changes related to the above are already landing ...

Questions welcome!

-- Dirk
Reply all
Reply to author
Forward
0 new messages