From 1cb508122ce7a112c1d850d5e412acbd62df3c5d Mon Sep 17 00:00:00 2001 From: Gavin Mak Date: Fri, 27 Aug 2021 00:18:33 +0000 Subject: [PATCH] Add PYTHON_VERSION_COMPATIBILITY to gerrit recipe module Bug: 1227140 Change-Id: I3cea6609eb5bb6b7f392e1078eb023ca19c6fb3e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3123939 Reviewed-by: Anthony Polito Commit-Queue: Gavin Mak --- recipes/README.recipes.md | 14 +++++++------- recipes/recipe_modules/gerrit/__init__.py | 2 ++ recipes/recipe_modules/gerrit/examples/full.py | 2 ++ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md index 6b0611fbfa..559f4afaa0 100644 --- a/recipes/README.recipes.md +++ b/recipes/README.recipes.md @@ -7,7 +7,7 @@ * [cipd](#recipe_modules-cipd) — API for interacting with CIPD. * [depot_tools](#recipe_modules-depot_tools) — The `depot_tools` module provides safe functions to access paths within the depot_tools repo. * [gclient](#recipe_modules-gclient) - * [gerrit](#recipe_modules-gerrit) + * [gerrit](#recipe_modules-gerrit) (Python3 ✅) * [git](#recipe_modules-git) * [git_cl](#recipe_modules-git_cl) (Python3 ✅) * [gitiles](#recipe_modules-gitiles) (Python3 ✅) @@ -29,7 +29,7 @@ * [gclient:tests/diff_deps](#recipes-gclient_tests_diff_deps) * [gclient:tests/patch_project](#recipes-gclient_tests_patch_project) * [gclient:tests/sync_failure](#recipes-gclient_tests_sync_failure) - * [gerrit:examples/full](#recipes-gerrit_examples_full) + * [gerrit:examples/full](#recipes-gerrit_examples_full) (Python3 ✅) * [git:examples/full](#recipes-git_examples_full) * [git_cl:examples/full](#recipes-git_cl_examples_full) (Python3 ✅) * [gitiles:examples/full](#recipes-gitiles_examples_full) (Python3 ✅) @@ -363,9 +363,9 @@ revision map. This doesn't overwrite the revision if it was already set.   **@use_mirror.setter**
— **def [use\_mirror](/recipes/recipe_modules/gclient/api.py#116)(self, val):** ### *recipe_modules* / [gerrit](/recipes/recipe_modules/gerrit) -[DEPS](/recipes/recipe_modules/gerrit/__init__.py#1): [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/file][recipe_engine/recipe_modules/file], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step] +[DEPS](/recipes/recipe_modules/gerrit/__init__.py#3): [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/file][recipe_engine/recipe_modules/file], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step] -PYTHON_VERSION_COMPATIBILITY: PY2 +PYTHON_VERSION_COMPATIBILITY: PY2+3 #### **class [GerritApi](/recipes/recipe_modules/gerrit/api.py#7)([RecipeApi][recipe_engine/wkt/RecipeApi]):** @@ -1134,11 +1134,11 @@ PYTHON_VERSION_COMPATIBILITY: PY2 — **def [RunSteps](/recipes/recipe_modules/gclient/tests/sync_failure.py#13)(api):** ### *recipes* / [gerrit:examples/full](/recipes/recipe_modules/gerrit/examples/full.py) -[DEPS](/recipes/recipe_modules/gerrit/examples/full.py#5): [gerrit](#recipe_modules-gerrit), [recipe\_engine/step][recipe_engine/recipe_modules/step] +[DEPS](/recipes/recipe_modules/gerrit/examples/full.py#7): [gerrit](#recipe_modules-gerrit), [recipe\_engine/step][recipe_engine/recipe_modules/step] -PYTHON_VERSION_COMPATIBILITY: PY2 +PYTHON_VERSION_COMPATIBILITY: PY2+3 -— **def [RunSteps](/recipes/recipe_modules/gerrit/examples/full.py#11)(api):** +— **def [RunSteps](/recipes/recipe_modules/gerrit/examples/full.py#13)(api):** ### *recipes* / [git:examples/full](/recipes/recipe_modules/git/examples/full.py) [DEPS](/recipes/recipe_modules/git/examples/full.py#5): [git](#recipe_modules-git), [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step] diff --git a/recipes/recipe_modules/gerrit/__init__.py b/recipes/recipe_modules/gerrit/__init__.py index bc5971cb50..2feecb8208 100644 --- a/recipes/recipe_modules/gerrit/__init__.py +++ b/recipes/recipe_modules/gerrit/__init__.py @@ -1,3 +1,5 @@ +PYTHON_VERSION_COMPATIBILITY = 'PY2+3' + DEPS = [ 'recipe_engine/context', 'recipe_engine/file', diff --git a/recipes/recipe_modules/gerrit/examples/full.py b/recipes/recipe_modules/gerrit/examples/full.py index b36b7fea32..ec617f7278 100644 --- a/recipes/recipe_modules/gerrit/examples/full.py +++ b/recipes/recipe_modules/gerrit/examples/full.py @@ -2,6 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +PYTHON_VERSION_COMPATIBILITY = 'PY2+3' + DEPS = [ 'gerrit', 'recipe_engine/step',