[Python-checkins] Fix missing `f` prefix on f-strings (GH-91910)

miss-islington webhook-mailer at python.org
Wed Apr 27 03:01:47 EDT 2022


https://github.com/python/cpython/commit/081e95165e2482c80ec05ff3aa4ddad103e64b61
commit: 081e95165e2482c80ec05ff3aa4ddad103e64b61
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-04-27T00:01:11-07:00
summary:

Fix missing `f` prefix on f-strings (GH-91910)

(cherry picked from commit f882d33778ee2625ab32d90e28edb6878fb8af93)

Co-authored-by: Alexander Shadchin <alexandr.shadchin at gmail.com>

files:
A Misc/NEWS.d/next/Library/2022-04-25-14-18-01.gh-issue-91910.kY-JR0.rst
M Lib/asyncio/base_events.py
M Lib/multiprocessing/util.py

diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py
index 7a14e5e139f02..4356bfae01798 100644
--- a/Lib/asyncio/base_events.py
+++ b/Lib/asyncio/base_events.py
@@ -885,7 +885,7 @@ async def _sock_sendfile_native(self, sock, file, offset, count):
         # non-mmap files even if sendfile is supported by OS
         raise exceptions.SendfileNotAvailableError(
             f"syscall sendfile is not available for socket {sock!r} "
-            "and file {file!r} combination")
+            f"and file {file!r} combination")
 
     async def _sock_sendfile_fallback(self, sock, file, offset, count):
         if offset:
diff --git a/Lib/multiprocessing/util.py b/Lib/multiprocessing/util.py
index 21f2a7ebe2500..697b35a0eb09d 100644
--- a/Lib/multiprocessing/util.py
+++ b/Lib/multiprocessing/util.py
@@ -120,7 +120,7 @@ def is_abstract_socket_namespace(address):
         return address[0] == 0
     elif isinstance(address, str):
         return address[0] == "\0"
-    raise TypeError('address type of {address!r} unrecognized')
+    raise TypeError(f'address type of {address!r} unrecognized')
 
 
 abstract_sockets_supported = _platform_supports_abstract_sockets()
diff --git a/Misc/NEWS.d/next/Library/2022-04-25-14-18-01.gh-issue-91910.kY-JR0.rst b/Misc/NEWS.d/next/Library/2022-04-25-14-18-01.gh-issue-91910.kY-JR0.rst
new file mode 100644
index 0000000000000..f41f357ddfcc3
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2022-04-25-14-18-01.gh-issue-91910.kY-JR0.rst
@@ -0,0 +1 @@
+Add missing f prefix to f-strings in error messages from the :mod:`multiprocessing` and :mod:`asyncio` modules.



More information about the Python-checkins mailing list