From d8f450aebb26cd1179ff39d0198a34b38a358b67 Mon Sep 17 00:00:00 2001 From: Daniele Sassoli Date: Mon, 24 Jun 2024 09:16:57 +0100 Subject: [PATCH] Migrate to python 3 Given that on most systems Python is still linked to the Python 2.7, switch explicitly to using Python 3. Python 2.7 was discontinued on January 1, 2020: [1]. Moreover, there is PEP recommending to use python3 in the shebang: [2]. [1] https://www.python.org/doc/sunset-python-2 [2] https://www.python.org/dev/peps/pep-0394 Change-Id: Idd3ed567b0384c6ff0a6121ad736f8af4c0f85e0 --- .bazelrc | 2 +- tools/workspace_status.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bazelrc b/.bazelrc index 7c71c4a9d0..375beeca4c 100644 --- a/.bazelrc +++ b/.bazelrc @@ -2,7 +2,7 @@ # https://issues.gerritcodereview.com/issues/303819949 common --noenable_bzlmod -build --workspace_status_command="python ./tools/workspace_status.py" +build --workspace_status_command="python3 ./tools/workspace_status.py" build --repository_cache=~/.gerritcodereview/bazel-cache/repository build --incompatible_strict_action_env build --action_env=PATH diff --git a/tools/workspace_status.py b/tools/workspace_status.py index ca9e0a98c9..1186a4a77a 100644 --- a/tools/workspace_status.py +++ b/tools/workspace_status.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (C) 2020, David Ostrovsky and others # # This program and the accompanying materials are made available under the -- 2.39.5