[Python-checkins] bpo-42574: Use format() instead of f-string in Tools/clinic/clinic.py to allow using older Python versions (GH-23685)

pablogsal webhook-mailer at python.org
Mon Dec 7 18:45:28 EST 2020


https://github.com/python/cpython/commit/b6d6f5367da1f2e3f749c358ae8563c56a0cc395
commit: b6d6f5367da1f2e3f749c358ae8563c56a0cc395
branch: 3.8
author: Pablo Galindo <Pablogsal at gmail.com>
committer: pablogsal <Pablogsal at gmail.com>
date: 2020-12-07T23:45:21Z
summary:

bpo-42574: Use format() instead of f-string in Tools/clinic/clinic.py to allow using older Python versions (GH-23685)

files:
M Tools/clinic/clinic.py

diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py
index 40c95e454cd88..d350a9a9d72ea 100755
--- a/Tools/clinic/clinic.py
+++ b/Tools/clinic/clinic.py
@@ -1769,7 +1769,7 @@ def write_file(filename, new_contents):
         pass
 
     # Atomic write using a temporary file and os.replace()
-    filename_new = f"{filename}.new"
+    filename_new = "{}.new".format(filename)
     with open(filename_new, "w", encoding="utf-8") as fp:
         fp.write(new_contents)
 



More information about the Python-checkins mailing list