From f3d8908338a434167f851de00ea9e4380d127891 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Fri, 18 Sep 2026 14:38:01 +0000 Subject: [PATCH] tools: update `tools/v8` for Python 3.13 The `pipes` module was removed in Python 3.13 after being deprecated in Python 3.11. Also remove Python 2 compatibility shim as scripts require Python 3. Assisted-by: IBM Bob Signed-off-by: Richard Lau --- tools/v8/fetch_deps.py | 3 --- tools/v8/node_common.py | 8 +++----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/tools/v8/fetch_deps.py b/tools/v8/fetch_deps.py index 055ffb50eafb..2d72127f9558 100755 --- a/tools/v8/fetch_deps.py +++ b/tools/v8/fetch_deps.py @@ -9,9 +9,6 @@ Usage: fetch_deps.py """ -# for py2/py3 compatibility -from __future__ import print_function - import os import subprocess import sys diff --git a/tools/v8/node_common.py b/tools/v8/node_common.py index f873065c1dfe..f9b3074e3e11 100755 --- a/tools/v8/node_common.py +++ b/tools/v8/node_common.py @@ -3,11 +3,9 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -# for py2/py3 compatibility -from __future__ import print_function import os -import pipes +import shlex import shutil import stat import subprocess @@ -29,8 +27,8 @@ def _Get(v8_path): print("Checking out depot_tools.") # shell=True needed on Windows to resolve git.bat. subprocess.check_call("git clone {} {}".format( - pipes.quote(DEPOT_TOOLS_URL), - pipes.quote(depot_tools)), shell=True) + shlex.quote(DEPOT_TOOLS_URL), + shlex.quote(depot_tools)), shell=True) # Using check_output to hide warning messages. subprocess.check_output( [sys.executable, gclient_path, "metrics", "--opt-out"],