From 94b8164f4d2a3e0b22d7576123815853bd582cdd Mon Sep 17 00:00:00 2001 From: Armando Montanez Date: Mon, 31 Mar 2025 09:22:50 -0700 Subject: [PATCH] fix: Fix Python 3.4.x compatibilty with bootstrap (#2709) Fixes some f-strings, trailing commas, and out-of-order argument unpacking to restore compatibility with Python 3.4.x. --- python/private/python_bootstrap_template.txt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/python/private/python_bootstrap_template.txt b/python/private/python_bootstrap_template.txt index e3b39e30cd..6893ae22c1 100644 --- a/python/private/python_bootstrap_template.txt +++ b/python/private/python_bootstrap_template.txt @@ -95,19 +95,17 @@ def print_verbose(*args, mapping=None, values=None): for key, value in sorted((mapping or {}).items()): print( "bootstrap:", - *args, - f"{key}={value!r}", + *(list(args) + ["{}={}".format(key, repr(value))]), file=sys.stderr, - flush=True, + flush=True ) elif values is not None: for i, v in enumerate(values): print( "bootstrap:", - *args, - f"[{i}] {v!r}", + *(list(args) + ["[{}] {}".format(i, repr(v))]), file=sys.stderr, - flush=True, + flush=True ) else: print("bootstrap:", *args, file=sys.stderr, flush=True)