diff -r d0f775432705 Doc/library/fileinput.rst --- a/Doc/library/fileinput.rst Thu Jun 28 01:45:48 2012 +0200 +++ b/Doc/library/fileinput.rst Thu Jun 28 12:21:04 2012 +0300 @@ -143,7 +143,8 @@ sequential order; random access and :meth:`readline` cannot be mixed. With *mode* you can specify which file mode will be passed to :func:`open`. It - must be one of ``'r'``, ``'rU'``, ``'U'`` and ``'rb'``. + must be one of ``'r'``, ``'rU'``, ``'U'`` and ``'rb'``. ``'rU'`` and ``'U'`` + modes are deprecated, unneeded in new code and will not be used in new code. The *openhook*, when given, must be a function that takes two arguments, *filename* and *mode*, and returns an accordingly opened file-like object. You diff -r d0f775432705 Doc/library/functions.rst --- a/Doc/library/functions.rst Thu Jun 28 01:45:48 2012 +0200 +++ b/Doc/library/functions.rst Thu Jun 28 12:21:04 2012 +0300 @@ -815,7 +815,7 @@ ``'b'`` binary mode ``'t'`` text mode (default) ``'+'`` open a disk file for updating (reading and writing) - ``'U'`` universal newline mode (for backwards compatibility; should + ``'U'`` universal newline mode (deprecated; unneeded in new code; should not be used in new code) ========= =============================================================== diff -r d0f775432705 Doc/library/subprocess.rst --- a/Doc/library/subprocess.rst Thu Jun 28 01:45:48 2012 +0200 +++ b/Doc/library/subprocess.rst Thu Jun 28 12:21:04 2012 +0300 @@ -240,8 +240,7 @@ When *stdout* or *stderr* are pipes and *universal_newlines* is :const:`True` then the output data is assumed to be encoded as UTF-8 and will automatically be decoded to text. All line endings will be converted - to ``'\n'`` as described for the universal newlines ``'U'`` mode argument - to :func:`open`. + to ``'\n'`` as described for :func:`open` with enabled universal newlines. If *shell* is :const:`True`, the specified command will be executed through the shell. This can be useful if you are using Python primarily for the diff -r d0f775432705 Doc/library/zipfile.rst --- a/Doc/library/zipfile.rst Thu Jun 28 01:45:48 2012 +0200 +++ b/Doc/library/zipfile.rst Thu Jun 28 12:21:04 2012 +0300 @@ -203,7 +203,9 @@ the name of the file in the archive, or a :class:`ZipInfo` object. The *mode* parameter, if included, must be one of the following: ``'r'`` (the default), ``'U'``, or ``'rU'``. Choosing ``'U'`` or ``'rU'`` will enable universal newline - support in the read-only object. *pwd* is the password used for encrypted files. + support in the read-only object (deprecated; should not be used in new code; + use :class:`io.TextWrapper` for reading compressed text files). + *pwd* is the password used for encrypted files. Calling :meth:`open` on a closed ZipFile will raise a :exc:`RuntimeError`. .. note:: diff -r d0f775432705 Lib/_pyio.py --- a/Lib/_pyio.py Thu Jun 28 01:45:48 2012 +0200 +++ b/Lib/_pyio.py Thu Jun 28 12:21:04 2012 +0300 @@ -63,8 +63,8 @@ 'b' binary mode 't' text mode (default) '+' open a disk file for updating (reading and writing) - 'U' universal newline mode (for backwards compatibility; unneeded - for new code) + 'U' universal newline mode (deprecated; unneeded for new code; should + not be used in new code) ========= =============================================================== The default mode is 'rt' (open for reading text). For binary random diff -r d0f775432705 Modules/_io/_iomodule.c --- a/Modules/_io/_iomodule.c Thu Jun 28 01:45:48 2012 +0200 +++ b/Modules/_io/_iomodule.c Thu Jun 28 12:21:04 2012 +0300 @@ -126,8 +126,8 @@ "'b' binary mode\n" "'t' text mode (default)\n" "'+' open a disk file for updating (reading and writing)\n" -"'U' universal newline mode (for backwards compatibility; unneeded\n" -" for new code)\n" +"'U' universal newline mode (deprecated; unneeded for new code; should\n" +" not be used in new code)\n" "========= ===============================================================\n" "\n" "The default mode is 'rt' (open for reading text). For binary random\n"