Remove recipe warnings due to python module.

The python module is deprecated in favor of using the step module with
an explicit python binary. Switching the code to use the step module and
remove DEPS on recipe_engine/python removes warnings when running recipe
tests in the repo.

Change-Id: If3c9d5d6aff5aab69898b535399accbef92f5c0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3880624
Commit-Queue: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
This commit is contained in:
Garrett Beaty
2022-09-09 17:25:14 +00:00
committed by LUCI CQ
parent 787e71ac8b
commit 3d1a52e074
10 changed files with 23 additions and 35 deletions

View File

@@ -1,7 +1,7 @@
PYTHON_VERSION_COMPATIBILITY = 'PY2+3'
DEPS = [
'recipe_engine/context',
'recipe_engine/python',
'recipe_engine/raw_io',
'recipe_engine/context',
'recipe_engine/raw_io',
'recipe_engine/step',
]

View File

@@ -16,10 +16,9 @@ class GitClApi(recipe_api.RecipeApi):
name = name + ' (%s)' % kwargs.pop('suffix')
my_loc = self.c.repo_location if self.c else None
cmd = ['vpython', self.repo_resource('git_cl.py'), subcmd] + args
with self.m.context(cwd=self.m.context.cwd or my_loc):
return self.m.python(
name, self.repo_resource('git_cl.py'), [subcmd] + args,
venv=True, **kwargs)
return self.m.step(name, cmd, **kwargs)
def get_description(self, patch_url=None, **kwargs):
"""DEPRECATED. Consider using gerrit.get_change_description instead."""