Python 3 presubmits

9 views
Skip to first unread message

Bruce Dawson

unread,
Nov 10, 2022, 1:28:41 AM11/10/22
to python
I ran a scan to see how many third_party PRESUBMIT.py files don't have the "USE_PYTHON3 = True" marker, in hopes that we could soon retire support for Python 2 presubmits in depot_tools (Chromium itself has been Python 3 only in presubmits for quite a while). My script found these seven PRESUBMIT.py scripts:

third_party\angle\infra\config\PRESUBMIT.py
third_party\depot_tools\tests\PRESUBMIT.py
third_party\perfetto\PRESUBMIT.py
third_party\perfetto\test\trace_processor\PRESUBMIT.py
third_party\perfetto\ui\PRESUBMIT.py
third_party\swiftshader\third_party\SPIRV-Tools\PRESUBMIT.py
third_party\vulkan-deps\spirv-tools\src\PRESUBMIT.py

The perfetto team just needed some pointers on how to do the switch and has created a CL that should get all of their presubmits onto Python 3. The angle team created a CL for infra\config\PRESUBMIT.py and another one for SPIRV-Tools\PRESUBMIT.py (which should make it to both copies of that file).

So, once those changes have rolled in then depot_tools\tests\PRESUBMIT.py should be the only PRESUBMIT.py file in a Chromium repo that is missing the tag, and presumably that is only that way in order to support all the other PRESUBMIT.py files.

I don't know what other infra/internal repos there might be, but I've seen a lot of work in that area recently. There might also be external projects using depot_tools presubmit system, but it seems like we might be able to drop support for Python 2 presubmits real-soon-now. It's kind of exciting!

Andrew Grieve

unread,
Nov 10, 2022, 9:51:02 AM11/10/22
to Bruce Dawson, python
Awesome work! Very exciting indeed!

--
You received this message because you are subscribed to the Google Groups "python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python+un...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/python/0443d102-ab47-4fad-94f6-8776af4e08cfn%40chromium.org.
Reply all
Reply to author
Forward
0 new messages