]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix missing `f` prefix on f-strings (GH-91910)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 27 Apr 2022 07:01:11 +0000 (00:01 -0700)
committerGitHub <noreply@github.com>
Wed, 27 Apr 2022 07:01:11 +0000 (00:01 -0700)
(cherry picked from commit f882d33778ee2625ab32d90e28edb6878fb8af93)

Co-authored-by: Alexander Shadchin <alexandr.shadchin@gmail.com>
Lib/asyncio/base_events.py
Lib/multiprocessing/util.py
Misc/NEWS.d/next/Library/2022-04-25-14-18-01.gh-issue-91910.kY-JR0.rst [new file with mode: 0644]

index 7a14e5e139f029c33f3abd55fbf35e6d2985a534..4356bfae0179882e43ebbfac55a6ab28fa5d7cf5 100644 (file)
@@ -885,7 +885,7 @@ class BaseEventLoop(events.AbstractEventLoop):
         # 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:
index 21f2a7ebe250028c97ccf1befa2e769e44bb42de..697b35a0eb09da5087c380a59752efaf1fee263e 100644 (file)
@@ -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 (file)
index 0000000..f41f357
--- /dev/null
@@ -0,0 +1 @@
+Add missing f prefix to f-strings in error messages from the :mod:`multiprocessing` and :mod:`asyncio` modules.