Skip to content

[3.9] bpo-43776: Remove list call from args in Popen repr (GH-25338) #26510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2021

Conversation

gpshead
Copy link
Member

@gpshead gpshead commented Jun 3, 2021

Removes the list call in the Popen repr.

Current implementation:

For cmd = python --version, with shell=True.

<Popen: returncode: None args: ['p', 'y', 't', 'h', 'o', 'n', ' ', '-', '-',...>

For shell=False and args=['python', '--version'], the output is correct:

<Popen: returncode: None args: ['python', '--version']>

With the new changes the repr yields:

For cmd = python --version, with shell=True:

<Popen: returncode: None args: 'python --version'>

For shell=False and args=['python', '--version'], the output:

<Popen: returncode: None args: ['python', '--version']>

Automerge-Triggered-By: GH:gpshead.
(cherry picked from commit db0c5b7)

Co-authored-by: M. Kocher [email protected]

https://bugs.python.org/issue43776

…5338)

Removes the `list` call in the Popen `repr`.

Current implementation:

For cmd = `python --version`,  with `shell=True`.

```bash
<Popen: returncode: None args: ['p', 'y', 't', 'h', 'o', 'n', ' ', '-', '-',...>
```

For `shell=False` and args=`['python', '--version']`, the output is correct:

```bash
<Popen: returncode: None args: ['python', '--version']>
```

With the new changes the `repr`  yields:

For cmd = `python --version`,  with `shell=True`:

```bash
<Popen: returncode: None args: 'python --version'>
```

For `shell=False` and args=`['python', '--version']`, the output:

```bash
<Popen: returncode: None args: ['python', '--version']>
```

Automerge-Triggered-By: GH:gpshead.
(cherry picked from commit db0c5b7)

Co-authored-by: M. Kocher <[email protected]>
@bedevere-bot bedevere-bot added the type-bug An unexpected behavior, bug, or error label Jun 3, 2021
@gpshead gpshead self-assigned this Jun 3, 2021
@gpshead gpshead merged commit 5a8ddcc into python:3.9 Jun 3, 2021
@gpshead gpshead deleted the backport-db0c5b7-3.9 branch June 3, 2021 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants