summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-11-23 20:12:06 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-11-23 20:12:06 (GMT)
commit6787a3806ee6a85a6f21ede70c10e15a6df267c4 (patch)
treed72149a2f3a4eab3e8f288fa2a25bb1957620d91 /Doc
parentd41c343f28bd7631cfa866f8276673ccafb71d57 (diff)
downloadcpython-6787a3806ee6a85a6f21ede70c10e15a6df267c4.zip
cpython-6787a3806ee6a85a6f21ede70c10e15a6df267c4.tar.gz
cpython-6787a3806ee6a85a6f21ede70c10e15a6df267c4.tar.bz2
Issue #15204: Deprecated the 'U' mode in file-like objects.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/fileinput.rst3
-rw-r--r--Doc/library/functions.rst6
-rw-r--r--Doc/library/zipfile.rst3
3 files changed, 10 insertions, 2 deletions
diff --git a/Doc/library/fileinput.rst b/Doc/library/fileinput.rst
index d5a4875..ee06830 100644
--- a/Doc/library/fileinput.rst
+++ b/Doc/library/fileinput.rst
@@ -160,6 +160,9 @@ available for subclassing as well:
.. versionchanged:: 3.2
Can be used as a context manager.
+ .. deprecated:: 3.4
+ The ``'rU'`` and ``'U'`` modes.
+
**Optional in-place filtering:** if the keyword argument ``inplace=True`` is
passed to :func:`fileinput.input` or to the :class:`FileInput` constructor, the
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index ffee09e..474bb1d 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -872,8 +872,7 @@ are always available. They are listed here in alphabetical order.
``'b'`` binary mode
``'t'`` text mode (default)
``'+'`` open a disk file for updating (reading and writing)
- ``'U'`` universal newlines mode (for backwards compatibility; should
- not be used in new code)
+ ``'U'`` :term:`universal newlines` mode (deprecated)
========= ===============================================================
The default mode is ``'r'`` (open for reading text, synonym of ``'rt'``).
@@ -1029,6 +1028,9 @@ are always available. They are listed here in alphabetical order.
.. versionchanged:: 3.4
The file is now non-inheritable.
+ .. deprecated-removed:: 3.4 4.0
+ The ``'U'`` mode.
+
.. XXX works for bytes too, but should it?
.. function:: ord(c)
diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst
index 72b76a0..1966713 100644
--- a/Doc/library/zipfile.rst
+++ b/Doc/library/zipfile.rst
@@ -234,6 +234,9 @@ ZipFile Objects
or a :class:`ZipInfo` object. You will appreciate this when trying to read a
ZIP file that contains members with duplicate names.
+ .. deprecated-removed:: 3.4 3.6
+ The ``'U'`` or ``'rU'`` mode. Use :class:`io.TextIOWrapper` for reading
+ compressed text files in :term:`universal newlines` mode.
.. method:: ZipFile.extract(member, path=None, pwd=None)