asyncio: create_subprocess_exec is the same as create_subprocess_shell, except where it isn't (#11076)

asyncio.subprocess: duplicate _shell args to _exec

Fixes: 38dfb57adf

Expanding the keywords used True arguments for shell in both _exec and _shell. The _exec one is for shell=False. With the text argument, its the other way around: both demand Falsy here, so match those lines.
This commit is contained in:
Paul J. Dorn
2023-11-29 16:11:03 +00:00
committed by GitHub
parent d5685789cc
commit 1d3a18c6da

View File

@@ -80,14 +80,14 @@ if sys.version_info >= (3, 11):
stdout: int | IO[Any] | None = None,
stderr: int | IO[Any] | None = None,
limit: int = 65536,
# These parameters are forced to these values by BaseEventLoop.subprocess_shell
# These parameters are forced to these values by BaseEventLoop.subprocess_exec
universal_newlines: Literal[False] = False,
shell: Literal[True] = True,
shell: Literal[False] = False,
bufsize: Literal[0] = 0,
encoding: None = None,
errors: None = None,
text: Literal[False] | None = None,
# These parameters are taken by subprocess.Popen, which this ultimately delegates to
text: bool | None = None,
executable: StrOrBytesPath | None = None,
preexec_fn: Callable[[], Any] | None = None,
close_fds: bool = True,
@@ -145,14 +145,14 @@ elif sys.version_info >= (3, 10):
stdout: int | IO[Any] | None = None,
stderr: int | IO[Any] | None = None,
limit: int = 65536,
# These parameters are forced to these values by BaseEventLoop.subprocess_shell
# These parameters are forced to these values by BaseEventLoop.subprocess_exec
universal_newlines: Literal[False] = False,
shell: Literal[True] = True,
shell: Literal[False] = False,
bufsize: Literal[0] = 0,
encoding: None = None,
errors: None = None,
text: Literal[False] | None = None,
# These parameters are taken by subprocess.Popen, which this ultimately delegates to
text: bool | None = None,
executable: StrOrBytesPath | None = None,
preexec_fn: Callable[[], Any] | None = None,
close_fds: bool = True,
@@ -210,14 +210,14 @@ else: # >= 3.9
stderr: int | IO[Any] | None = None,
loop: events.AbstractEventLoop | None = None,
limit: int = 65536,
# These parameters are forced to these values by BaseEventLoop.subprocess_shell
# These parameters are forced to these values by BaseEventLoop.subprocess_exec
universal_newlines: Literal[False] = False,
shell: Literal[True] = True,
shell: Literal[False] = False,
bufsize: Literal[0] = 0,
encoding: None = None,
errors: None = None,
text: Literal[False] | None = None,
# These parameters are taken by subprocess.Popen, which this ultimately delegates to
text: bool | None = None,
executable: StrOrBytesPath | None = None,
preexec_fn: Callable[[], Any] | None = None,
close_fds: bool = True,