Skip to content

Commit 30e2a19

Browse files
committed
📝 New features in Python 3.15
1 parent 9d72fc5 commit 30e2a19

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
plantuml_output_format = "svg"
5959

6060
intersphinx_mapping = {
61-
"python3": ("https://docs.python.org/3/", None),
61+
"python3": ("https://docs.python.org/3.15/", None),
6262
"python3.14": ("https://docs.python.org/3.14/", None),
6363
"jupyter-tutorial": ("https://jupyter-tutorial.readthedocs.io/en/latest/", None),
6464
"Python4DataScience": ("https://www.python4data.science/en/latest/", None),

docs/types/strings/encodings.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,23 @@ defines several different encodings from a single character set. UTF-8 is an
111111
encoding scheme for representing Unicode characters as binary data with one or
112112
more bytes per character.
113113

114+
.. versionadded:: 3.15
115+
Python 3.15 uses UTF-8 as the default encoding, regardless of the system
116+
environment. This means that I/O operations without explicit encoding, for
117+
example :samp:`open("{EXAMPLE.TXT}")`, use UTF-8. This only applies if no
118+
encoding is specified.
119+
120+
To ensure compatibility between different Python versions, an explicit
121+
encoding should always be specified. Opt-in :ref:`io-encoding-warning` can be
122+
used to identify code that may be affected by this change.
123+
124+
To keeep the previous behaviour, Python’s UTF-8 mode can be disabled with the
125+
environment variable ``PYTHONUTF8=0`` or the command line option ``-X
126+
utf8=0``.
127+
128+
.. seealso::
129+
:pep:`686`
130+
114131
Encoding and decoding
115132
---------------------
116133

0 commit comments

Comments
 (0)