Reland "Remove Python 2 support for PRESUBMIT.py"
This reverts commit d4c6cbeb61f3be41476de5ce984ec528d8209e88.
Reason for revert: Python 2 invocations of the presubmit system
should be gone now.
Original change's description:
> Revert "Remove Python 2 support for PRESUBMIT.py"
>
> This reverts commit 8454fc2458b2421e0e339714c6ff7e6fffb70dc4.
>
> Reason for revert: post submit hooks failing
> https://crbug.com/1422416
>
> Original change's description:
> > Remove Python 2 support for PRESUBMIT.py
> >
> > The presubmit system still supports invoking PRESUBMIT.py files using
> > Python 2. This has recently been turned off on the bots so this change
> > removes support more completely.
> >
> > There are still some python3 parameters being passed around - it seemed
> > better to do the simplest possible removal now, with a follow-up change
> > to remove more support code after this has sat for a while.
> >
> > Tests run from PRESUBMIT.py files could still be run using Python 2, but
> > those should also have been addressed already. Removing support for that
> > will be done in a subsequent change.
> >
> > Bug: 1207012
> > Change-Id: Id244d547a04438f83734dba269c3cc180c148b37
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4315183
> > Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
> > Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
>
> Bug: 1207012
> Bug: 1422416
> Change-Id: Iaf3102e63ec3c698d0258fac5746dbd92c30edbb
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4317176
> Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bug: 1207012
Bug: 1422416
Change-Id: I9521095989c708188fca0251fa13881e086b1395
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4516015
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index a51f878..8f90a4e 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -1432,21 +1432,11 @@
' was not specified. To enable ResultDB, please run the command'
' again with the --realm argument to specify the LUCI realm.')
- py3_results = self._RunPresubmit(args,
- description,
- use_python3=True,
- resultdb=resultdb,
- realm=realm)
- if py3_results.get('skipped_presubmits', 1) == 0:
- print('No more presubmits to run - skipping Python 2 presubmits.')
- return py3_results
-
- py2_results = self._RunPresubmit(args,
- description,
- use_python3=False,
- resultdb=resultdb,
- realm=realm)
- return self._MergePresubmitResults(py2_results, py3_results)
+ return self._RunPresubmit(args,
+ description,
+ use_python3=True,
+ resultdb=resultdb,
+ realm=realm)
def _RunPresubmit(self,
args,