]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-90301: Doc: Add references to PEP 686 (GH-96816)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 4 Oct 2022 22:14:52 +0000 (15:14 -0700)
committerPablo Galindo <pablogsal@gmail.com>
Sat, 22 Oct 2022 19:05:32 +0000 (20:05 +0100)
Doc: Add references to PEP 686.
(cherry picked from commit 87679a6e607eec1134d77222a3a92d0d11f768ad)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
Doc/library/io.rst
Doc/library/os.rst

index 03c90ad72b9e436b76615cab2db81cd989fb0172..8fd6b3537019aa96efba28c0ac60ac62eb1a81ab 100644 (file)
@@ -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:
 
index c667592dc20284352b7774820b85f74e9edf96de..7185016042415ecb0b5ce95c37850f9be2b78efb 100644 (file)
@@ -159,6 +159,11 @@ can be read from :data:`sys.flags.utf8_mode <sys.flags>`.
 See also the :ref:`UTF-8 mode on Windows <win-utf8-mode>`
 and the :term:`filesystem encoding and error handler`.
 
+.. seealso::
+
+   :pep:`686`
+      Python 3.15 will make :ref:`utf8-mode` default.
+
 
 .. _os-procinfo: