summaryrefslogtreecommitdiffstats
path: root/Doc/library/io.rst
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2022-10-04 22:04:44 (GMT)
committerGitHub <noreply@github.com>2022-10-04 22:04:44 (GMT)
commit87679a6e607eec1134d77222a3a92d0d11f768ad (patch)
tree9e681868ba207128ea28744c4061da1bcf355b98 /Doc/library/io.rst
parent9fbfa42ece3e0256657ce2594c7c3eb8b3ac8ff3 (diff)
downloadcpython-87679a6e607eec1134d77222a3a92d0d11f768ad.zip
cpython-87679a6e607eec1134d77222a3a92d0d11f768ad.tar.gz
cpython-87679a6e607eec1134d77222a3a92d0d11f768ad.tar.bz2
gh-90301: Doc: Add references to PEP 686 (#96816)
Doc: Add references to PEP 686.
Diffstat (limited to 'Doc/library/io.rst')
-rw-r--r--Doc/library/io.rst16
1 files changed, 9 insertions, 7 deletions
diff --git a/Doc/library/io.rst b/Doc/library/io.rst
index 97a7064..7ec990c 100644
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -123,17 +123,19 @@ encoding is not UTF-8 for most Windows users. For example::
with open("README.md") as f:
long_description = f.read()
-Additionally, while there is no concrete plan as of yet, Python may change
-the default text file encoding to UTF-8 in the future.
-
Accordingly, it is highly recommended that you specify the encoding
explicitly when opening text files. If you want to use UTF-8, pass
``encoding="utf-8"``. To use the current locale encoding,
-``encoding="locale"`` is supported in Python 3.10.
+``encoding="locale"`` is supported since Python 3.10.
+
+.. seealso::
+
+ :ref:`utf8-mode`
+ Python UTF-8 Mode can be used to change the default encoding to
+ UTF-8 from locale-specific encoding.
-When you need to run existing code on Windows that attempts to open
-UTF-8 files using the default locale encoding, you can enable the UTF-8
-mode. See :ref:`UTF-8 mode on Windows <win-utf8-mode>`.
+ :pep:`686`
+ Python 3.15 will make :ref:`utf8-mode` default.
.. _io-encoding-warning: