Stdlib: add defaults for several functions that delegate kwargs to other functions at runtime (#9791)

This commit is contained in:
Alex Waygood
2023-02-22 07:31:25 +00:00
committed by GitHub
parent 6ac15185fb
commit fbc092b4cd
7 changed files with 1394 additions and 1370 deletions

View File

@@ -54,24 +54,24 @@ if sys.version_info >= (3, 11):
bufsize: Literal[0] = 0,
encoding: None = None,
errors: None = None,
text: Literal[False, None] = ...,
text: Literal[False, None] = None,
# These parameters are taken by subprocess.Popen, which this ultimately delegates to
executable: StrOrBytesPath | None = ...,
preexec_fn: Callable[[], Any] | None = ...,
close_fds: bool = ...,
cwd: StrOrBytesPath | None = ...,
env: subprocess._ENV | None = ...,
startupinfo: Any | None = ...,
creationflags: int = ...,
restore_signals: bool = ...,
start_new_session: bool = ...,
executable: StrOrBytesPath | None = None,
preexec_fn: Callable[[], Any] | None = None,
close_fds: bool = True,
cwd: StrOrBytesPath | None = None,
env: subprocess._ENV | None = None,
startupinfo: Any | None = None,
creationflags: int = 0,
restore_signals: bool = True,
start_new_session: bool = False,
pass_fds: Collection[int] = ...,
group: None | str | int = ...,
extra_groups: None | Collection[str | int] = ...,
user: None | str | int = ...,
umask: int = ...,
process_group: int | None = ...,
pipesize: int = ...,
group: None | str | int = None,
extra_groups: None | Collection[str | int] = None,
user: None | str | int = None,
umask: int = -1,
process_group: int | None = None,
pipesize: int = -1,
) -> Process: ...
async def create_subprocess_exec(
program: _ExecArg,
@@ -87,23 +87,23 @@ if sys.version_info >= (3, 11):
encoding: None = None,
errors: None = None,
# These parameters are taken by subprocess.Popen, which this ultimately delegates to
text: bool | None = ...,
executable: StrOrBytesPath | None = ...,
preexec_fn: Callable[[], Any] | None = ...,
close_fds: bool = ...,
cwd: StrOrBytesPath | None = ...,
env: subprocess._ENV | None = ...,
startupinfo: Any | None = ...,
creationflags: int = ...,
restore_signals: bool = ...,
start_new_session: bool = ...,
text: bool | None = None,
executable: StrOrBytesPath | None = None,
preexec_fn: Callable[[], Any] | None = None,
close_fds: bool = True,
cwd: StrOrBytesPath | None = None,
env: subprocess._ENV | None = None,
startupinfo: Any | None = None,
creationflags: int = 0,
restore_signals: bool = True,
start_new_session: bool = False,
pass_fds: Collection[int] = ...,
group: None | str | int = ...,
extra_groups: None | Collection[str | int] = ...,
user: None | str | int = ...,
umask: int = ...,
process_group: int | None = ...,
pipesize: int = ...,
group: None | str | int = None,
extra_groups: None | Collection[str | int] = None,
user: None | str | int = None,
umask: int = -1,
process_group: int | None = None,
pipesize: int = -1,
) -> Process: ...
elif sys.version_info >= (3, 10):
@@ -120,23 +120,23 @@ elif sys.version_info >= (3, 10):
bufsize: Literal[0] = 0,
encoding: None = None,
errors: None = None,
text: Literal[False, None] = ...,
text: Literal[False, None] = None,
# These parameters are taken by subprocess.Popen, which this ultimately delegates to
executable: StrOrBytesPath | None = ...,
preexec_fn: Callable[[], Any] | None = ...,
close_fds: bool = ...,
cwd: StrOrBytesPath | None = ...,
env: subprocess._ENV | None = ...,
startupinfo: Any | None = ...,
creationflags: int = ...,
restore_signals: bool = ...,
start_new_session: bool = ...,
executable: StrOrBytesPath | None = None,
preexec_fn: Callable[[], Any] | None = None,
close_fds: bool = True,
cwd: StrOrBytesPath | None = None,
env: subprocess._ENV | None = None,
startupinfo: Any | None = None,
creationflags: int = 0,
restore_signals: bool = True,
start_new_session: bool = False,
pass_fds: Collection[int] = ...,
group: None | str | int = ...,
extra_groups: None | Collection[str | int] = ...,
user: None | str | int = ...,
umask: int = ...,
pipesize: int = ...,
group: None | str | int = None,
extra_groups: None | Collection[str | int] = None,
user: None | str | int = None,
umask: int = -1,
pipesize: int = -1,
) -> Process: ...
async def create_subprocess_exec(
program: _ExecArg,
@@ -152,22 +152,22 @@ elif sys.version_info >= (3, 10):
encoding: None = None,
errors: None = None,
# These parameters are taken by subprocess.Popen, which this ultimately delegates to
text: bool | None = ...,
executable: StrOrBytesPath | None = ...,
preexec_fn: Callable[[], Any] | None = ...,
close_fds: bool = ...,
cwd: StrOrBytesPath | None = ...,
env: subprocess._ENV | None = ...,
startupinfo: Any | None = ...,
creationflags: int = ...,
restore_signals: bool = ...,
start_new_session: bool = ...,
text: bool | None = None,
executable: StrOrBytesPath | None = None,
preexec_fn: Callable[[], Any] | None = None,
close_fds: bool = True,
cwd: StrOrBytesPath | None = None,
env: subprocess._ENV | None = None,
startupinfo: Any | None = None,
creationflags: int = 0,
restore_signals: bool = True,
start_new_session: bool = False,
pass_fds: Collection[int] = ...,
group: None | str | int = ...,
extra_groups: None | Collection[str | int] = ...,
user: None | str | int = ...,
umask: int = ...,
pipesize: int = ...,
group: None | str | int = None,
extra_groups: None | Collection[str | int] = None,
user: None | str | int = None,
umask: int = -1,
pipesize: int = -1,
) -> Process: ...
else: # >= 3.9
@@ -185,22 +185,22 @@ else: # >= 3.9
bufsize: Literal[0] = 0,
encoding: None = None,
errors: None = None,
text: Literal[False, None] = ...,
text: Literal[False, None] = None,
# These parameters are taken by subprocess.Popen, which this ultimately delegates to
executable: StrOrBytesPath | None = ...,
preexec_fn: Callable[[], Any] | None = ...,
close_fds: bool = ...,
cwd: StrOrBytesPath | None = ...,
env: subprocess._ENV | None = ...,
startupinfo: Any | None = ...,
creationflags: int = ...,
restore_signals: bool = ...,
start_new_session: bool = ...,
executable: StrOrBytesPath | None = None,
preexec_fn: Callable[[], Any] | None = None,
close_fds: bool = True,
cwd: StrOrBytesPath | None = None,
env: subprocess._ENV | None = None,
startupinfo: Any | None = None,
creationflags: int = 0,
restore_signals: bool = True,
start_new_session: bool = False,
pass_fds: Collection[int] = ...,
group: None | str | int = ...,
extra_groups: None | Collection[str | int] = ...,
user: None | str | int = ...,
umask: int = ...,
group: None | str | int = None,
extra_groups: None | Collection[str | int] = None,
user: None | str | int = None,
umask: int = -1,
) -> Process: ...
async def create_subprocess_exec(
program: _ExecArg,
@@ -217,19 +217,19 @@ else: # >= 3.9
encoding: None = None,
errors: None = None,
# These parameters are taken by subprocess.Popen, which this ultimately delegates to
text: bool | None = ...,
executable: StrOrBytesPath | None = ...,
preexec_fn: Callable[[], Any] | None = ...,
close_fds: bool = ...,
cwd: StrOrBytesPath | None = ...,
env: subprocess._ENV | None = ...,
startupinfo: Any | None = ...,
creationflags: int = ...,
restore_signals: bool = ...,
start_new_session: bool = ...,
text: bool | None = None,
executable: StrOrBytesPath | None = None,
preexec_fn: Callable[[], Any] | None = None,
close_fds: bool = True,
cwd: StrOrBytesPath | None = None,
env: subprocess._ENV | None = None,
startupinfo: Any | None = None,
creationflags: int = 0,
restore_signals: bool = True,
start_new_session: bool = False,
pass_fds: Collection[int] = ...,
group: None | str | int = ...,
extra_groups: None | Collection[str | int] = ...,
user: None | str | int = ...,
umask: int = ...,
group: None | str | int = None,
extra_groups: None | Collection[str | int] = None,
user: None | str | int = None,
umask: int = -1,
) -> Process: ...