bpo-43776: Remove list call from args in Popen repr (GH-25338)
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
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index 2b78549..8203ade 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -1003,7 +1003,7 @@ def __init__(self, args, bufsize=-1, executable=None,
def __repr__(self):
obj_repr = (
f"<{self.__class__.__name__}: "
- f"returncode: {self.returncode} args: {list(self.args)!r}>"
+ f"returncode: {self.returncode} args: {self.args!r}>"
)
if len(obj_repr) > 80:
obj_repr = obj_repr[:76] + "...>"