[Python-checkins] [3.11] io: Add missing f (#96701)

pablogsal webhook-mailer at python.org
Fri Sep 9 05:28:31 EDT 2022


https://github.com/python/cpython/commit/7bfb11de6857e8b7e114c46d94624b57c589a69f
commit: 7bfb11de6857e8b7e114c46d94624b57c589a69f
branch: 3.11
author: Jelle Zijlstra <jelle.zijlstra at gmail.com>
committer: pablogsal <Pablogsal at gmail.com>
date: 2022-09-09T10:28:26+01:00
summary:

[3.11] io: Add missing f (#96701)

files:
A Misc/NEWS.d/next/Library/2022-09-08-23-23-24.gh-issue-96700.J0MQGK.rst
M Lib/io.py

diff --git a/Lib/io.py b/Lib/io.py
index a205e00575f..a4186499c64 100644
--- a/Lib/io.py
+++ b/Lib/io.py
@@ -70,7 +70,7 @@ def __getattr__(name):
         global OpenWrapper
         OpenWrapper = open
         return OpenWrapper
-    raise AttributeError("module {__name__!r} has no attribute {name!r}")
+    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
 
 
 # Pretend this exception was created here.
diff --git a/Misc/NEWS.d/next/Library/2022-09-08-23-23-24.gh-issue-96700.J0MQGK.rst b/Misc/NEWS.d/next/Library/2022-09-08-23-23-24.gh-issue-96700.J0MQGK.rst
new file mode 100644
index 00000000000..5218f98cfea
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2022-09-08-23-23-24.gh-issue-96700.J0MQGK.rst
@@ -0,0 +1 @@
+Fix incorrect error message in the :mod:`io` module.



More information about the Python-checkins mailing list