Update gerrit-auto-critic for a virtualenv API change

Recent versions of virtualenv have changed their main API during a
massive rewrite. This means that the create_environment entry point is
no longer available, scripts have to use 'cli_run' instead.

The patch updates the Gerrit auto-critic script for this change.

Change-Id: I6fb85622877b1d2835a1ed8f5a7df56185326949
Reviewed-on: http://gerrit.cloudera.org:8080/18800
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
This commit is contained in:
Laszlo Gaal
2022-07-30 00:34:17 +02:00
committed by Impala Public Jenkins
parent 522ee1fcc0
commit b86d49508a

View File

@@ -76,7 +76,7 @@ EXCLUDE_FILE_PATTERNS = [
def setup_virtualenv():
"""Set up virtualenv with flake8-diff."""
virtualenv.create_environment(VENV_PATH)
virtualenv.cli_run([VENV_PATH])
check_call([PIP_PATH, "install",
"flake8=={0}".format(FLAKE8_VERSION),
"flake8-diff=={0}".format(FLAKE8_DIFF_VERSION)])