Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7240ba7

Browse filesBrowse files
miss-islingtonslatenygpshead
authored
[3.11] gh-47937: Note that Popen attributes are read-only (GH-93070) (#101684)
* Note that Popen attributes aren't meant to be set by users by rewording the text about the attributes. * Also update some universal_newlines references to mention the modern text parameter name while in the area. (cherry picked from commit 027adf4) Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
1 parent fa90671 commit 7240ba7
Copy full SHA for 7240ba7

File tree

Expand file treeCollapse file tree

1 file changed

+12
-11
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+12
-11
lines changed

‎Doc/library/subprocess.rst

Copy file name to clipboardExpand all lines: Doc/library/subprocess.rst
+12-11Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ functions.
458458
- :const:`0` means unbuffered (read and write are one
459459
system call and can return short)
460460
- :const:`1` means line buffered
461-
(only usable if ``universal_newlines=True`` i.e., in a text mode)
461+
(only usable if ``text=True`` or ``universal_newlines=True``)
462462
- any other positive value means use a buffer of approximately that
463463
size
464464
- negative bufsize (the default) means the system default of
@@ -849,7 +849,8 @@ Instances of the :class:`Popen` class have the following methods:
849849
On Windows :meth:`kill` is an alias for :meth:`terminate`.
850850

851851

852-
The following attributes are also available:
852+
The following attributes are also set by the class for you to access.
853+
Reassigning them to new values is unsupported:
853854

854855
.. attribute:: Popen.args
855856

@@ -862,29 +863,29 @@ The following attributes are also available:
862863

863864
If the *stdin* argument was :data:`PIPE`, this attribute is a writeable
864865
stream object as returned by :func:`open`. If the *encoding* or *errors*
865-
arguments were specified or the *universal_newlines* argument was ``True``,
866-
the stream is a text stream, otherwise it is a byte stream. If the *stdin*
867-
argument was not :data:`PIPE`, this attribute is ``None``.
866+
arguments were specified or the *text* or *universal_newlines* argument
867+
was ``True``, the stream is a text stream, otherwise it is a byte stream.
868+
If the *stdin* argument was not :data:`PIPE`, this attribute is ``None``.
868869

869870

870871
.. attribute:: Popen.stdout
871872

872873
If the *stdout* argument was :data:`PIPE`, this attribute is a readable
873874
stream object as returned by :func:`open`. Reading from the stream provides
874875
output from the child process. If the *encoding* or *errors* arguments were
875-
specified or the *universal_newlines* argument was ``True``, the stream is a
876-
text stream, otherwise it is a byte stream. If the *stdout* argument was not
877-
:data:`PIPE`, this attribute is ``None``.
876+
specified or the *text* or *universal_newlines* argument was ``True``, the
877+
stream is a text stream, otherwise it is a byte stream. If the *stdout*
878+
argument was not :data:`PIPE`, this attribute is ``None``.
878879

879880

880881
.. attribute:: Popen.stderr
881882

882883
If the *stderr* argument was :data:`PIPE`, this attribute is a readable
883884
stream object as returned by :func:`open`. Reading from the stream provides
884885
error output from the child process. If the *encoding* or *errors* arguments
885-
were specified or the *universal_newlines* argument was ``True``, the stream
886-
is a text stream, otherwise it is a byte stream. If the *stderr* argument was
887-
not :data:`PIPE`, this attribute is ``None``.
886+
were specified or the *text* or *universal_newlines* argument was ``True``, the
887+
stream is a text stream, otherwise it is a byte stream. If the *stderr* argument
888+
was not :data:`PIPE`, this attribute is ``None``.
888889

889890
.. warning::
890891

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.