Commit Graph

262 Commits

Author SHA1 Message Date
James b5d9e08114 bpo-31884 subprocess: add Windows constants for process priority (#4150) 2017-11-08 06:18:59 -08:00
andyclegg 7fed7bd8bb bpo-31756: subprocess.run should alias universal_newlines to text (#4049)
Improve human friendliness of the Popen API: Add text=False as a
keyword-only argument to subprocess.Popen along with a Popen
attribute .text_mode and set this based on the
encoding/errors/universal_newlines/text arguments.

The universal_newlines parameter and attribute are maintained for
backwards compatibility.
2017-10-22 19:01:19 -07:00
Gregory P. Smith 738b7d9766 bpo-22635: subprocess.getstatusoutput doc update. (#3398)
The `subprocess.getstatusoutput` API was inadvertently changed
in Python 3.3.4.  Document the change, it is too late to undo the
API change now as it has shipped in many stable releases.
2017-09-06 17:39:23 -07:00
Ivan Chernoff 006617ff7d bpo-31065: Add doc about Popen.poll returning None. (#3169) 2017-08-29 07:46:24 -07:00
Alex Gaynor 368cf1d206 bpo-30420: List cwd parameter in subprocess convenience APIs (GH-1685)
Partially clarify the subprocess convenience API documentation by
explicitly listing the `cwd` parameter in their abbreviated signatures.

While this has been merged as an improvement, it doesn't fully
resolve the issue, as the `cwd` should also be covered in the
"Frequently Used Arguments" section, and the fact these APIs
pass unlisted keyword arguments down to the lower level APIs
is currently still unclear.
2017-05-26 12:28:17 +10:00
Berker Peksag f5184745a5 Tweak subprocess.STARTUPINFO documentation (#347)
* Document STARTUPINFO constructor
* Move versionchanged directive to above of attributes
2017-03-01 12:51:55 +03:00
Sayan Chowdhury d5c11f7ace bpo-28624: Add a test that checks that cwd parameter of Popen() accepts PathLike objects (#157) 2017-02-26 20:06:10 +03:00
Subhendu Ghosh ae160bba20 bpo-26128: Added __init__to subprocess.STARTUPINFO (#171)
The Windows-specific subprocess.STARTUPINFO class now accepts
keyword-only arguments to its constructor to set the various
data attributes.

Patch by Subhendu Ghosh.
2017-02-26 00:59:05 +10:00
Gregory P. Smith a9ef715b39 issue 20572: remove the deprecation notice for the deleted endtime parameter. 2016-11-20 16:35:30 -08:00
Serhiy Storchaka 7d6dda4b78 Issue #19795: Improved more markups of True/False. 2016-10-19 18:36:51 +03:00
Serhiy Storchaka 4adf01caae Issue #19795: Improved more markups of True/False. 2016-10-19 18:30:05 +03:00
Serhiy Storchaka 0bbf8c08ab Issue #19795: Mark up True and False as literal text instead of bold. 2016-10-19 16:44:47 +03:00
Serhiy Storchaka a97cd2eb17 Issue #19795: Mark up True and False as literal text instead of bold. 2016-10-19 16:43:42 +03:00
Serhiy Storchaka 989db5c880 Issue #19795: Mark up None as literal text. 2016-10-19 16:37:13 +03:00
Serhiy Storchaka ecf41da83e Issue #19795: Mark up None as literal text. 2016-10-19 16:29:26 +03:00
Steve Dower 050acaed99 Issue #6135: Adds encoding and errors parameters to subprocess 2016-09-06 20:16:17 -07:00
Martin Panter 6a09315ff0 Issue #26462: Merge code block fixes from 3.5 2016-07-29 01:49:37 +00:00
Martin Panter 1050d2d0c7 Issue #26462: Doc: reduce literal_block warnings, fix syntax highlighting.
Patch by Julien Palard.
2016-07-26 11:18:21 +02:00
Terry Jan Reedy 4da945f361 Merge Issue #22558. 2016-06-11 15:06:08 -04:00
Terry Jan Reedy fa089b9b0b Issue #22558: Add remaining doc links to source code for Python-coded modules.
Reformat header above separator line (added if missing) to a common format.
Patch by Yoni Lavi.
2016-06-11 15:02:54 -04:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) 3498db1f78 merge 3.5 2016-06-03 00:33:02 +00:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) 583a1d6240 Document that CalledProcessError.returncode is the negative
signal number when the process died due to a signal.
2016-06-03 00:31:21 +00:00
Victor Stinner 5a48e21ff1 subprocess now emits a ResourceWarning warning
Issue #26741: subprocess.Popen destructor now emits a ResourceWarning warning
if the child process is still running.
2016-05-20 12:11:15 +02:00
Georg Brandl 5d94134040 Closes #25910: fix dead and permanently redirected links in the docs. Thanks to SilentGhost for the patch. 2016-02-26 19:37:12 +01:00
R David Murray d529ebb438 Merge: #24998: fix cut and paste error in subprocess example. 2015-09-04 10:02:27 -04:00
R David Murray 17227a7334 #24998: fix cut and paste error in subprocess example. 2015-09-04 10:01:19 -04:00
Berker Peksag bf1d4b6d7d Issue #24420: Fix documentation regression introduced by f0a00ee094ff.
These functions accept same arguments as subprocess.Popen().

Patch by Martin Panter.
2015-07-25 14:27:07 +03:00
Benjamin Peterson ef9ffcbcd4 properly wrap 2015-04-14 22:12:14 -04:00
Gregory P. Smith 6e73000723 Add a subprocess.run() function than returns a CalledProcess instance for a
more consistent API than the existing call* functions.
(enhancement from issue 23342)
2015-04-14 16:14:25 -07:00
Victor Stinner 395c73436e Merge 3.4 (asyncio doc) 2014-10-14 00:53:13 +02:00
Victor Stinner 39892055cd asyncio doc: rewrite subprocess doc
* add a new example using transport and protocol
* rewrite the example using streams to make it much simpler (remove error
  handling, use a simpler Python code)
* copy (and adapt) more documentation from the subprocess module:

  - add a note about Process.wait() deadlock
  - add a note about shell injection
  - etc.

* sort Process methods and attributes in the same order than subprocess.Popen
  methods and attributes, so the documentation looks closer
* list differences between Process and subprocess.Popen APIs
2014-10-14 00:52:07 +02:00
Antoine Pitrou 6e311aa748 Issue #21332: Ensure that ``bufsize=1`` in subprocess.Popen() selects line buffering, rather than block buffering. 2014-09-21 21:15:42 +02:00
Antoine Pitrou afe8d0646c Issue #21332: Ensure that ``bufsize=1`` in subprocess.Popen() selects line buffering, rather than block buffering. 2014-09-21 21:10:56 +02:00
R David Murray 37f524f001 Merge: #21347: use string not list in shell=True example. 2014-05-14 10:10:14 -04:00
R David Murray ae9d193dc4 #21347: use string not list in shell=True example.
Patch by Akira.
2014-05-14 10:09:52 -04:00
Gregory P. Smith 3a17e21755 merge from 3.4 - clean up the subprocess docs warning-soup and
s/Unix/POSIX/.
2014-05-11 13:29:36 -07:00
Gregory P. Smith 8e0aa051e6 Change all references to Unix to POSIX in the subprocess docs. It's
more accurate and sounds less like a strange tale of yore.
2014-05-11 13:28:35 -07:00
Gregory P. Smith 6436cba9db Remove the warning-soup from the subprocess documentation by adding
a Security Considerations section as preferred by both the devguide
and documentation users who do not wish to go insane.
2014-05-11 13:26:21 -07:00
Gregory P. Smith 30a6df5b64 Document the subprocess Popen.args attribute (issue21353) 2014-04-29 11:34:15 -07:00
Gregory P. Smith d8ea56d26d Document the subprocess Popen.args attribute (issue21353) 2014-04-29 11:33:56 -07:00
Gregory P. Smith 024c5eecbc Document the subprocess Popen.args attribute (issue21353) 2014-04-29 11:33:23 -07:00
Andrew Kuchling 4f7b0c3c35 #10481: describe universal_newlines' effect on communicate()/check_output() output (alternately bytes or strings)
Patch by Sam Kimbrel.
2014-04-14 15:08:18 -04:00
Larry Hastings 3732ed2414 Merge in all documentation changes since branching 3.4.0rc1. 2014-03-15 21:13:56 -07:00
Benjamin Peterson 21317b654e merge 3.3 (#19060) 2014-03-12 21:42:04 -05:00
Benjamin Peterson 5eea8a7780 remove unnecessary word (closes #19060)
Patch by Anastasia Filatova.
2014-03-12 21:41:35 -05:00
Benjamin Peterson 605765fa32 merge 3.3 (#19060) 2014-03-12 21:42:04 -05:00
R David Murray 48b6b70b95 #10197: Update get[status]output versionchanged with actual version.
This was perhaps on the border between a bug fix and a feature since
the Python3 docs did not originally say it was unix only.  However, the
functions never worked anywhere but unix, and the docs were changed to
say it was unix only well before the windows support was added.

Unfortunately, windows support was added in 3.3.4 as well as 3.4.
That leaves us in the uncomfortable position of needing the tag to say
"version changed: 3.3.4" :(
2014-03-07 20:04:41 -05:00
R David Murray 95b696a010 #10197: Update get[status]output versionchanged with actual version.
This was perhaps on the border between a bug fix and a feature since
the Python3 docs did not originally say it was unix only.  However, the
functions never worked anywhere but unix, and the docs were changed to
say it was unix only well before the windows support was added.

Unfortunately, windows support was added in 3.3.4 as well as 3.4.
That leaves us in the uncomfortable position of needing the tag to say
"version changed: 3.3.4" :(
2014-03-07 20:04:17 -05:00
Victor Stinner 07171242d5 subprocess.Popen.wait doc: mention asyncio to avoid busy loop 2014-02-24 13:18:47 +01:00
Gregory P. Smith bbe3335f65 Deprecate Popen.wait()'s undocumented endtime parameter. issue20572. 2014-02-11 09:21:03 -08:00
Benjamin Peterson 3c16c1d821 merge 3.3 2014-01-18 00:49:30 -05:00
Benjamin Peterson af69fe2311 rm extra whitespace 2014-01-18 00:49:04 -05:00
Benjamin Peterson 9308c420d3 merge 3.3 2014-01-18 00:47:06 -05:00
Benjamin Peterson eacec1ccff link to builtin open not io.open 2014-01-18 00:47:00 -05:00
Benjamin Peterson d8af6700b9 merge 3.3 (#17814) 2014-01-18 00:46:49 -05:00
Benjamin Peterson 3d8814e1d3 describe type of Popen streams (closes #17814)
Patch more or less by Nikolaus Rath.
2014-01-18 00:45:56 -05:00
Serhiy Storchaka 0e90e99188 Issue #19795: Improved markup of True/False constants. 2013-11-29 12:19:53 +02:00
Serhiy Storchaka fbc1c26803 Issue #19795: Improved markup of True/False constants. 2013-11-29 12:17:13 +02:00
Georg Brandl 5831882c08 merge with 3.3 2013-11-26 08:25:45 +01:00
Georg Brandl 1833ac37b5 Markup fix. 2013-11-26 08:25:24 +01:00
Georg Brandl d476ab1276 merge with 3.3 2013-11-25 08:52:24 +01:00
Georg Brandl 37b70bb908 Closes #19622: clarify message about bufsize changes in 3.2.4 and 3.3.1. 2013-11-25 08:48:37 +01:00
Tim Golden 607981402c Issue #10197 Tweak docs for subprocess.getstatusoutput and align the documentation, the module docstring, and the function docstring. 2013-11-05 12:57:25 +00:00
Tim Golden 2964138371 Issue #10197: Indicate availability of subprocess.get[status]output on Windows and add a note about the effects of universal newlines 2013-11-03 18:25:51 +00:00
Tim Golden 3a2abb5800 Issue #10197: Indicate availability of subprocess.get[status]output on Windows and add a note about the effects of universal newlines 2013-11-03 18:24:50 +00:00
Serhiy Storchaka 96d5c54130 Issue #18757: Improved cross-references in the concurrent package. 2013-08-24 00:27:59 +03:00
Serhiy Storchaka 9e0ae53980 Issue #18757: Improved cross-references in the concurrent package. 2013-08-24 00:23:38 +03:00
Ronald Oussoren 5f8e78545c (3.3->default) Cleanup of documentation change from #17860
Reformulated the textual change, and applied it to the docstring as well.
2013-07-07 09:28:01 +02:00
Ronald Oussoren 385521c90e Cleanup of documentation change from #17860
Reformulated the textual change, and applied it to the docstring as well.
2013-07-07 09:26:45 +02:00
Ronald Oussoren c17d0c2218 (3.3->default) Issue #17860: explicitly mention that std* streams are opened in binary mode by default.
The documentation does mention that the streams are opened in text mode
when univeral_newlines is true, but not that that they are opened in
binary mode when that argument is false and that seems to confuse at
least some users.
2013-07-06 10:25:04 +02:00
Ronald Oussoren a68650553d Issue #17860: explicitly mention that std* streams are opened in binary mode by default.
The documentation does mention that the streams are opened in text mode
when univeral_newlines is true, but not that that they are opened in
binary mode when that argument is false and that seems to confuse at
least some users.
2013-07-06 10:23:59 +02:00
Serhiy Storchaka fcd9f22238 Issue #16624: `subprocess.check_output` now accepts an `input` argument,
allowing the subprocess's stdin to be provided as a (byte) string.
Patch by Zack Weinberg.
2013-04-22 20:20:54 +03:00
Georg Brandl 1bab7134a8 Merge with 3.3. 2013-03-28 13:28:55 +01:00
Georg Brandl 44ea77bd81 Closes #4159: add LaTeX tabular column specifications to tables that otherwise are cut off or have overlapping text. 2013-03-28 13:28:44 +01:00
Gregory P. Smith 4a8ea9e2a6 Fixes issue #17488: Change the subprocess.Popen bufsize parameter default value
from unbuffered (0) to buffering (-1) to match the behavior existing code
expects and match the behavior of the subprocess module in Python 2 to avoid
introducing hard to track down bugs.
2013-03-23 12:00:00 -07:00
Gregory P. Smith a1b9ed32ee Fixes issue #17488: Change the subprocess.Popen bufsize parameter default value
from unbuffered (0) to buffering (-1) to match the behavior existing code
expects and match the behavior of the subprocess module in Python 2 to avoid
introducing hard to track down bugs.
2013-03-23 11:54:22 -07:00
Gregory P. Smith a1ed539268 Fixes issue #17488: Change the subprocess.Popen bufsize parameter default value
from unbuffered (0) to buffering (-1) to match the behavior existing code
expects and match the behavior of the subprocess module in Python 2 to avoid
introducing hard to track down bugs.
2013-03-23 11:44:25 -07:00
Gregory P. Smith e25df59427 merge 2013-03-20 18:32:45 -07:00
Gregory P. Smith 74b24047e3 merge 2013-03-20 18:32:22 -07:00
Gregory P. Smith 1f8a40b81d remove the long obsolete mention of universal newlines mode only being
available when configured at compile time.
2013-03-20 18:32:03 -07:00
Gregory P. Smith 6409989dc8 clarifiy the documentation for issue17285. see also commit
ee30400efceb which updated the docstring.
2013-03-19 23:36:59 -07:00
Gregory P. Smith f16455aa4a clarifiy the documentation for issue17285. see also commit
ee30400efceb which updated the docstring.
2013-03-19 23:36:31 -07:00
Serhiy Storchaka b3f194d109 Issue #16903: Popen.communicate() on Unix now accepts strings when
universal_newlines is true as on Windows.
2013-02-04 16:47:39 +02:00
Tim Golden 9d30698d9e #16921 Since Win9x is no longer supported, CREATE_NEW_CONSOLE is
no longer implied by shell=True
2013-01-11 13:28:31 +00:00
Ezio Melotti 60e22b9c5d #10385: merge with 3.2. 2012-11-08 10:09:06 +02:00
Ezio Melotti 402f75d966 #10385: use the mod role in subprocess docs. 2012-11-08 10:07:10 +02:00
Andrew Svetlov c2415eb7e6 Issue #14616: Mention shlex.quote in subprocess docs.
Patch by Chris Rebert.
2012-10-28 11:42:26 +02:00
Chris Jerdonek c3de6d63cd Merge from 3.2: Fix placement of shell=True warning in subprocess.Popen() docs. 2012-10-10 22:53:35 -07:00
Chris Jerdonek cc32a68216 Fix placement of shell=True warning in subprocess.Popen() docs. 2012-10-10 22:52:22 -07:00
Chris Jerdonek 02860526eb Issue #16115: Merge subprocess.Popen() documentation improvements from 3.2. 2012-10-10 17:47:55 -07:00
Chris Jerdonek 4a4a02bbc8 Issue #16115: Make further improvements to subprocess.Popen() documentation. 2012-10-10 17:46:18 -07:00
Chris Jerdonek ad01498fa9 Issue #16115: Merge subprocess.Popen() documentation improvements from 3.2. 2012-10-08 23:12:21 -07:00
Chris Jerdonek 470ee39883 Issue #16115: Improve subprocess.Popen() documentation around args, shell, and executable arguments. 2012-10-08 23:06:57 -07:00
Chris Jerdonek 28714c8c26 Issue #15533: Merge fix from 3.2. 2012-09-30 02:15:37 -07:00
Chris Jerdonek ec3ea94251 Issue #15533: Clarify docs and add tests for subprocess.Popen()'s cwd argument. 2012-09-30 00:10:28 -07:00
Ezio Melotti a5377cafea #15789: merge with 3.2. 2012-09-15 08:34:47 +03:00
Ezio Melotti 186d5238ea #15789: mention shell-like parts of the stdlib in the subprocess docs. Patch by Chris Rebert. 2012-09-15 08:34:08 +03:00
Ezio Melotti 7f79f7cf23 #15788: merge with 3.2. 2012-08-27 10:03:23 +03:00
Ezio Melotti aa935dfe9c #15788: fix broken links in subprocess doc. Patch by Chris Rebert. 2012-08-27 10:00:05 +03:00
R David Murray 0689ce4396 #15543: reflow paragraph. 2012-08-15 11:13:31 -04:00