typeshed
typeshed copied to clipboard
[stdlib] Add default values part 2
-
faulthandler- https://github.com/python/cpython/blob/main/Modules/faulthandler.c -
hashlib- generic constructor, but all other functions haveusedforsecurity=True -
itertools.count- https://github.com/python/cpython/blob/8cfd7b4ecf9c01ca2bea57fe640250f716cb6ee3/Modules/itertoolsmodule.c#L3388 -
itertools.accumulate- https://github.com/python/cpython/blob/8cfd7b4ecf9c01ca2bea57fe640250f716cb6ee3/Modules/itertoolsmodule.c#L2981 -
itertools.islice- https://github.com/python/cpython/blob/8cfd7b4ecf9c01ca2bea57fe640250f716cb6ee3/Modules/itertoolsmodule.c#L1510 -
itertools.zip_longest- https://github.com/python/cpython/blob/8cfd7b4ecf9c01ca2bea57fe640250f716cb6ee3/Modules/itertoolsmodule.c#L3908 -
itertools.permutations- https://github.com/python/cpython/blob/8cfd7b4ecf9c01ca2bea57fe640250f716cb6ee3/Modules/itertoolsmodule.c#L2738 -
multiprocessing- taken from parent classpickle.Pickler.__init__(self, file: SupportsWrite[bytes], protocol: int | None = None, ...) -
os.fdopen- arguments are passed toio.open, whose signature, judging by typeshed, is the same asbuiltins.open -
os.posix_spawn- https://github.com/python/cpython/blob/8cfd7b4ecf9c01ca2bea57fe640250f716cb6ee3/Modules/posixmodule.c#L7597 -
os.posix_spawnp- https://github.com/python/cpython/blob/8cfd7b4ecf9c01ca2bea57fe640250f716cb6ee3/Modules/posixmodule.c#L7643 -
os.copy_file_range- https://github.com/python/cpython/blob/8cfd7b4ecf9c01ca2bea57fe640250f716cb6ee3/Modules/posixmodule.c#L12501 -
os.pidfd_open- https://github.com/python/cpython/blob/8cfd7b4ecf9c01ca2bea57fe640250f716cb6ee3/Modules/posixmodule.c#L10285 -
os.splice- https://github.com/python/cpython/blob/8cfd7b4ecf9c01ca2bea57fe640250f716cb6ee3/Modules/posixmodule.c#L12565 -
pstats.Stats- https://github.com/python/cpython/blob/8cfd7b4ecf9c01ca2bea57fe640250f716cb6ee3/Lib/pstats.py#L110 -
sched.scheduler- https://github.com/python/cpython/blob/8cfd7b4ecf9c01ca2bea57fe640250f716cb6ee3/Lib/sched.py#L53 -
select.kevent- https://github.com/python/cpython/blob/8cfd7b4ecf9c01ca2bea57fe640250f716cb6ee3/Modules/selectmodule.c#L1775 -
select.epoll.__new__- https://github.com/python/cpython/blob/8cfd7b4ecf9c01ca2bea57fe640250f716cb6ee3/Modules/selectmodule.c#L1355 -
select.epoll.__exit__- https://github.com/python/cpython/blob/8cfd7b4ecf9c01ca2bea57fe640250f716cb6ee3/Modules/selectmodule.c#L1706 -
select.devpoll.poll- https://github.com/python/cpython/blob/8cfd7b4ecf9c01ca2bea57fe640250f716cb6ee3/Modules/selectmodule.c#L943 -
ssl- even though default values use constants "aliases", I used enum values to work around flake8 errors. I also moved the functions below so that these objects are defined. -
syslog.openlog- https://github.com/python/cpython/blob/8cfd7b4ecf9c01ca2bea57fe640250f716cb6ee3/Modules/syslogmodule.c#L141 -
timeit.Timer- https://github.com/python/cpython/blob/8cfd7b4ecf9c01ca2bea57fe640250f716cb6ee3/Lib/timeit.py#L101C57-L101C70 -
timeit.timeit- https://github.com/python/cpython/blob/8cfd7b4ecf9c01ca2bea57fe640250f716cb6ee3/Lib/timeit.py#L231 -
timeit.repeat- https://github.com/python/cpython/blob/8cfd7b4ecf9c01ca2bea57fe640250f716cb6ee3/Lib/timeit.py#L237 -
zipfile- default values are taken fromio.TextIOWrapperinto which all arguments are passed
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉