This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: docs says subprocess.run accepts a string but this does not work on linux
Type: behavior Stage: resolved
Components: Documentation Versions:
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: SilentGhost, docs@python, gregory.p.smith, simon mackenzie
Priority: normal Keywords:

Created on 2019-08-15 10:38 by simon mackenzie, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (5)
msg349800 - (view) Author: simon mackenzie (simon mackenzie) Date: 2019-08-15 10:38
The docs for subprocess.run say "The arguments used to launch the process. This may be a list or a string."

This works in windows but in linux it has to be a list. Either needs fixing or the docs need to be changed.
msg349803 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2019-08-15 12:47
The only place this phrase appears is in CompletedProcess.args description and it is correct there. Whether args arguments of subprocess.run (or generally Popen) can be a list or a string is discussed in Frequently Used Arguments section, and it is perfectly clear from reading the text under which condition you can pass a string as args argument. I don't think anything needs fixing, both implementation and docs are correct.
msg349804 - (view) Author: simon mackenzie (simon mackenzie) Date: 2019-08-15 12:52
Technically true but I am not the first person to have incorrectly
interpreted this that it can be a string which suggests it is not clear to
the reader. Maybe should be explicitly stated in the description of run as
it is not obvious or intuitive.

On Thu, 15 Aug 2019 at 13:47, SilentGhost <report@bugs.python.org> wrote:

>
> SilentGhost <ghost.adh@runbox.com> added the comment:
>
> The only place this phrase appears is in CompletedProcess.args description
> and it is correct there. Whether args arguments of subprocess.run (or
> generally Popen) can be a list or a string is discussed in Frequently Used
> Arguments section, and it is perfectly clear from reading the text under
> which condition you can pass a string as args argument. I don't think
> anything needs fixing, both implementation and docs are correct.
>
> ----------
> assignee:  -> docs@python
> components: +Documentation
> nosy: +SilentGhost, docs@python
> type:  -> behavior
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue37867>
> _______________________________________
>
msg349805 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2019-08-15 14:04
But docs don't say that at all. You're looking at description of an attribute of returned object. And of course it can be a string, under certain conditions. The attributes of CompletedProcess and function arguments are described in the standard way, and I haven't heard of anyone mixing the two before.
msg349806 - (view) Author: simon mackenzie (simon mackenzie) Date: 2019-08-15 14:17
Would be clearer if the arguments were listed before the return object.

On Thu, 15 Aug 2019 at 15:05, SilentGhost <report@bugs.python.org> wrote:

>
> SilentGhost <ghost.adh@runbox.com> added the comment:
>
> But docs don't say that at all. You're looking at description of an
> attribute of returned object. And of course it can be a string, under
> certain conditions. The attributes of CompletedProcess and function
> arguments are described in the standard way, and I haven't heard of anyone
> mixing the two before.
>
> ----------
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue37867>
> _______________________________________
>
History
Date User Action Args
2022-04-11 14:59:19adminsetgithub: 82048
2019-08-15 14:17:52simon mackenziesetmessages: + msg349806
2019-08-15 14:04:59SilentGhostsetstatus: open -> closed
resolution: not a bug
messages: + msg349805

stage: resolved
2019-08-15 12:52:56simon mackenziesetmessages: + msg349804
title: docs says subprocess.run accepts a string but this does not work on linux -> docs says subprocess.run accepts a string but this does not work on linux
2019-08-15 12:47:03SilentGhostsetnosy: + docs@python, SilentGhost
messages: + msg349803

assignee: docs@python
components: + Documentation
type: behavior
2019-08-15 11:56:34xtreaksetnosy: + gregory.p.smith
2019-08-15 10:38:42simon mackenziecreate