[PSA] Running depot_tools scripts using Python 3.

241 views
Skip to first unread message

Edward Lesmes

unread,
Mar 3, 2020, 5:26:31 PM3/3/20
to Chromium-dev

Hello everyone,


We’ve been working on making depot_tools scripts work with vpython3.

As of now, setting the GCLIENT_PY3 environment variable to1 will make gclient, git-cl, fetch, roll-dep, and custom git commands (git-rebase-update, git-new-branch, etc) execute using vpython3 on Linux and Mac:


$ GCLIENT_PY3=1 gclient


Starting on March 24, we’ll start executing these commands using vpython3 by default on Linux and Mac.

If you experience any errors, setting the GCLIENT_PY3 environment variable to 0 will force the scripts to execute using vpython2:


$ GCLIENT_PY3=0 gclient


Please help us test depot_tools scripts with the GCLIENT_PY3=1 and report any bugs you encounter on crbug.com under the Infra>SDK component.


Let us know if you have any questions


Thank you!


Jamie Madill

unread,
Mar 4, 2020, 12:46:43 PM3/4/20
to Edward Lesmes, Chromium-dev
Just a general Q: are projects expected to migrate to Python 3-only at some point in the future?

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAJeMwD_0xvfhhYTmn6WHzWbRz9-3owy1GO1JDn8OhyJOipvgVQ%40mail.gmail.com.

Ben Henry

unread,
Mar 4, 2020, 1:33:29 PM3/4/20
to Chromium-dev, Jamie Madill, Chromium-dev, ehmal...@google.com
Yes, they are. But as of today, there's no known date by which we're targeting. I'm currently working to scope out the full extent of what it means to move everything to Python3. There are trusted migration paths for most things. vpython3 is a fairly large unknown at this point, but we're rapidly converging on a path forward. Expect more updates on chromium-dev in Q2 that read like "Python3 is eminent, here are the details about when how and what". 

On Wednesday, March 4, 2020 at 9:46:43 AM UTC-8 Jamie Madill wrote:
Just a general Q: are projects expected to migrate to Python 3-only at some point in the future?

On Tue, Mar 3, 2020 at 5:25 PM 'Edward Lesmes' via Chromium-dev <chromi...@chromium.org> wrote:

Hello everyone,


We’ve been working on making depot_tools scripts work with vpython3.

As of now, setting the GCLIENT_PY3 environment variable to1 will make gclient, git-cl, fetch, roll-dep, and custom git commands (git-rebase-update, git-new-branch, etc) execute using vpython3 on Linux and Mac:


$ GCLIENT_PY3=1 gclient


Starting on March 24, we’ll start executing these commands using vpython3 by default on Linux and Mac.

If you experience any errors, setting the GCLIENT_PY3 environment variable to 0 will force the scripts to execute using vpython2:


$ GCLIENT_PY3=0 gclient


Please help us test depot_tools scripts with the GCLIENT_PY3=1 and report any bugs you encounter on crbug.com under the Infra>SDK component.


Let us know if you have any questions


Thank you!


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.

Edward Lesmes

unread,
Mar 10, 2020, 2:41:41 PM3/10/20
to Chromium-dev
Friendly reminder to help us test depot_tools scripts (e.g. gclient, git-cl, fetch, roll-dep, etc) setting GCLIENT_PY3=1 in your environment.

Please report any bugs you encounter on crbug.com under the Infra>SDK component.

Christian Biesinger

unread,
Mar 11, 2020, 5:10:25 PM3/11/20
to ehmal...@google.com, Chromium-dev
Hi Edward,

are you also interested in bug reports when running ninja with Python
3? I see this error:

FAILED: gen/mojo/public/mojom/base/file_info_typemap.typemap_config
python ../../mojo/public/tools/bindings/validate_typemap_config.py
//mojo/public/mojom/base/file_info_typemap:file_info_typemap
/usr/local/google/home/cbiesinger/chromium/src/out/Debug/gen/mojo/public/mojom/base/file_info_typemap.typemap_config_unvalidated
/usr/local/google/home/cbiesinger/chromium/src/out/Debug/gen/mojo/public/mojom/base/file_info_typemap.typemap_config
Traceback (most recent call last):
File "../../mojo/public/tools/bindings/validate_typemap_config.py",
line 43, in <module>
main()
File "../../mojo/public/tools/bindings/validate_typemap_config.py",
line 39, in main
CheckCppTypemapConfig(args[0], args[1], args[2])
File "../../mojo/public/tools/bindings/validate_typemap_config.py",
line 21, in CheckCppTypemapConfig
for key in entry.iterkeys():
AttributeError: 'dict' object has no attribute 'iterkeys'

Christian
> --
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev
> ---
> You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
> To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAJeMwD98Yyq%2B9PxXtPhtn0HbGgA8XX0%3DaO6Svx8Q2GQxNkK79Q%40mail.gmail.com.

Takuto Ikuta

unread,
Mar 11, 2020, 5:20:05 PM3/11/20
to Christian Biesinger, Edward Lesmes, Chromium-dev
On Thu, Mar 12, 2020 at 6:09 AM Christian Biesinger <cbies...@chromium.org> wrote:
Hi Edward,

are you also interested in bug reports when running ninja with Python
3? I see this error:

We want to fix that (python3 in chromium/src) too, but a separate topic from this PSA (python3 in depot_tools).
I think some infra folks are planning how to migrate to python3 in chromium build but that is not started yet.
But some conversions are happening in crbug.com/941669

Edward Lesmes

unread,
Mar 23, 2020, 1:47:13 PM3/23/20
to Chromium-dev
This is happening now.
If you experience any problems, please report them on crbug.com under the Infra>SDK component. Also remember that setting GCLIENT_PY3=0 on your environment will force vpython2 execution, e.g.:

$ GCLIENT_PY3=0 gclient

Thank you!

Reply all
Reply to author
Forward
0 new messages