Issue #13597: Fix the documentation of the "-u" command-line option, and wording...
authorAntoine Pitrou <solipsis@pitrou.net>
Wed, 21 Dec 2011 10:24:15 +0000 (11:24 +0100)
committerAntoine Pitrou <solipsis@pitrou.net>
Wed, 21 Dec 2011 10:24:15 +0000 (11:24 +0100)
Doc/using/cmdline.rst
Doc/whatsnew/3.0.rst

index c73f1e0f3e8d1e39d676d731920286820bcf2935..9274d8e6b3f175c0302c4a9ceb628ee7415833ae 100644 (file)
@@ -247,7 +247,8 @@ Miscellaneous options
 
    Force the binary layer of the stdin, stdout and stderr streams (which is
    available as their ``buffer`` attribute) to be unbuffered.  The text I/O
-   layer will still be line-buffered.
+   layer will still be line-buffered if writing to the console, or
+   block-buffered if redirected to a non-interactive file.
 
    See also :envvar:`PYTHONUNBUFFERED`.
 
index 523b34e57406a98e17fabc927cdbfe3ac16d2bcd..55b65bae21b78074fa873c42abe856368b402bb3 100644 (file)
@@ -301,6 +301,12 @@ changed.
   There is no longer any need for using the encoding-aware streams
   in the :mod:`codecs` module.
 
+* The initial values of :data:`sys.stdin`, :data:`sys.stdout` and
+  :data:`sys.stderr` are now unicode-only text files (i.e., they are
+  instances of :class:`io.TextIOBase`).  To read and write bytes data
+  with these streams, you need to use their :data:`io.TextIOBase.buffer`
+  attribute.
+
 * Filenames are passed to and returned from APIs as (Unicode) strings.
   This can present platform-specific problems because on some
   platforms filenames are arbitrary byte strings.  (On the other hand,
@@ -511,9 +517,7 @@ consulted for longer descriptions.
   produces a literal of type :class:`bytes`.
 
 * :ref:`pep-3116`.  The :mod:`io` module is now the standard way of
-  doing file I/O, and the initial values of :data:`sys.stdin`,
-  :data:`sys.stdout` and :data:`sys.stderr` are now instances of
-  :class:`io.TextIOBase`.  The built-in :func:`open` function is now an
+  doing file I/O.  The built-in :func:`open` function is now an
   alias for :func:`io.open` and has additional keyword arguments
   *encoding*, *errors*, *newline* and *closefd*.  Also note that an
   invalid *mode* argument now raises :exc:`ValueError`, not