Skip to content

Commit 2eacb70

Browse files
authored
fix: bootstrapping script to not use multiline f-strings (#3175)
With bootstrap_impl=system_python, after #2607, host Python 3.6 and above is required because of the use of multiline f-strings. For maximum backwards compatibility (because this is a host dependency), do not use multiline f-strings. This issue naturally does not apply to bootstrap_impl=script because there are no host Python dependency. Link: #2607
1 parent 3262233 commit 2eacb70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/private/python_bootstrap_template.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,11 +436,11 @@ def _RunForCoverage(python_program, main_filename, args, env,
436436
unique_id = uuid.uuid4()
437437
rcfile_name = os.path.join(os.environ['COVERAGE_DIR'], ".coveragerc_{}".format(unique_id))
438438
with open(rcfile_name, "w") as rcfile:
439-
rcfile.write(f'''[run]
439+
rcfile.write('''[run]
440440
relative_files = True
441441
source =
442442
\t{source}
443-
''')
443+
'''.format(source=source))
444444
PrintVerboseCoverage('Coverage entrypoint:', coverage_entrypoint)
445445
# First run the target Python file via coveragepy to create a .coverage
446446
# database file, from which we can later export lcov.

0 commit comments

Comments
 (0)