mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-37330: open() no longer accept 'U' in file mode (GH-28118)
open(), io.open(), codecs.open() and fileinput.FileInput no longer accept "U" ("universal newline") in the file mode. This flag was deprecated since Python 3.3.
This commit is contained in:
parent
a806608705
commit
19ba2122ac
13 changed files with 61 additions and 104 deletions
|
@ -321,6 +321,14 @@ Changes in the Python API
|
|||
Python 3.8.
|
||||
(Contributed by Illia Volochii in :issue:`43234`.)
|
||||
|
||||
* :func:`open`, :func:`io.open`, :func:`codecs.open` and
|
||||
:class:`fileinput.FileInput` no longer accept ``'U'`` ("universal newline")
|
||||
in the file mode. This flag was deprecated since Python 3.3. In Python 3, the
|
||||
"universal newline" is used by default when a file is open in text mode. The
|
||||
:ref:`newline parameter <open-newline-parameter>` of :func:`open` controls
|
||||
how universal newlines works.
|
||||
(Contributed by Victor Stinner in :issue:`37330`.)
|
||||
|
||||
|
||||
C API Changes
|
||||
=============
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue