Add more defaults to the stdlib (#9606)

Continuing work towards #8988.

The first five commits were created using stubdefaulter on various Python versions; the following commits were all created manually by me to fix various problems. The main things this adds that weren't present in #9501 are:

- Defaults in Windows-only modules and Windows-only branches (because I'm running a Windows machine)
- Defaults in non-py311 branches
- Defaults for float parameters
- Defaults for overloads
This commit is contained in:
Alex Waygood
2023-01-29 01:51:23 +00:00
committed by GitHub
parent 25e02db42c
commit 33a62ae42d
150 changed files with 2761 additions and 2704 deletions

View File

@@ -45,59 +45,59 @@ if sys.version_info >= (3, 10):
elif sys.version_info >= (3, 9):
def compile_dir(
dir: StrPath,
maxlevels: int | None = ...,
ddir: StrPath | None = ...,
force: bool = ...,
rx: _SupportsSearch | None = ...,
quiet: int = ...,
legacy: bool = ...,
optimize: int = ...,
workers: int = ...,
invalidation_mode: PycInvalidationMode | None = ...,
maxlevels: int | None = None,
ddir: StrPath | None = None,
force: bool = False,
rx: _SupportsSearch | None = None,
quiet: int = 0,
legacy: bool = False,
optimize: int = -1,
workers: int = 1,
invalidation_mode: PycInvalidationMode | None = None,
*,
stripdir: str | None = ..., # https://bugs.python.org/issue40447
prependdir: StrPath | None = ...,
limit_sl_dest: StrPath | None = ...,
hardlink_dupes: bool = ...,
stripdir: str | None = None, # https://bugs.python.org/issue40447
prependdir: StrPath | None = None,
limit_sl_dest: StrPath | None = None,
hardlink_dupes: bool = False,
) -> int: ...
def compile_file(
fullname: StrPath,
ddir: StrPath | None = ...,
force: bool = ...,
rx: _SupportsSearch | None = ...,
quiet: int = ...,
legacy: bool = ...,
optimize: int = ...,
invalidation_mode: PycInvalidationMode | None = ...,
ddir: StrPath | None = None,
force: bool = False,
rx: _SupportsSearch | None = None,
quiet: int = 0,
legacy: bool = False,
optimize: int = -1,
invalidation_mode: PycInvalidationMode | None = None,
*,
stripdir: str | None = ..., # https://bugs.python.org/issue40447
prependdir: StrPath | None = ...,
limit_sl_dest: StrPath | None = ...,
hardlink_dupes: bool = ...,
stripdir: str | None = None, # https://bugs.python.org/issue40447
prependdir: StrPath | None = None,
limit_sl_dest: StrPath | None = None,
hardlink_dupes: bool = False,
) -> int: ...
else:
def compile_dir(
dir: StrPath,
maxlevels: int = ...,
ddir: StrPath | None = ...,
force: bool = ...,
rx: _SupportsSearch | None = ...,
quiet: int = ...,
legacy: bool = ...,
optimize: int = ...,
workers: int = ...,
invalidation_mode: PycInvalidationMode | None = ...,
maxlevels: int = 10,
ddir: StrPath | None = None,
force: bool = False,
rx: _SupportsSearch | None = None,
quiet: int = 0,
legacy: bool = False,
optimize: int = -1,
workers: int = 1,
invalidation_mode: PycInvalidationMode | None = None,
) -> int: ...
def compile_file(
fullname: StrPath,
ddir: StrPath | None = ...,
force: bool = ...,
rx: _SupportsSearch | None = ...,
quiet: int = ...,
legacy: bool = ...,
optimize: int = ...,
invalidation_mode: PycInvalidationMode | None = ...,
ddir: StrPath | None = None,
force: bool = False,
rx: _SupportsSearch | None = None,
quiet: int = 0,
legacy: bool = False,
optimize: int = -1,
invalidation_mode: PycInvalidationMode | None = None,
) -> int: ...
def compile_path(