diff --git a/stdlib/@tests/stubtest_allowlists/common.txt b/stdlib/@tests/stubtest_allowlists/common.txt index acff6703b57d..ab2e7d808682 100644 --- a/stdlib/@tests/stubtest_allowlists/common.txt +++ b/stdlib/@tests/stubtest_allowlists/common.txt @@ -10,7 +10,6 @@ _collections_abc.AsyncGenerator.ag_frame _collections_abc.AsyncGenerator.ag_running asyncio.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them asyncio.base_events.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them -builtins.dict.get collections\.ChainMap\.fromkeys # https://github.com/python/mypy/issues/17023 configparser.SectionProxy.__getattr__ # SectionProxy can have arbitrary attributes when custom converters are used configparser.SectionProxy.getboolean # SectionProxy get functions are set in __init__ diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index ad10ba9dff4c..9bfa16675859 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -1124,7 +1124,7 @@ class dict(MutableMapping[_KT, _VT]): def fromkeys(cls, iterable: Iterable[_T], value: _S, /) -> dict[_T, _S]: ... # Positional-only in dict, but not in MutableMapping @overload # type: ignore[override] - def get(self, key: _KT, /) -> _VT | None: ... + def get(self, key: _KT, default: None = None, /) -> _VT | None: ... @overload def get(self, key: _KT, default: _VT, /) -> _VT: ... @overload diff --git a/stdlib/importlib/metadata/__init__.pyi b/stdlib/importlib/metadata/__init__.pyi index 5e26f8987277..8ab7a0c4a9e8 100644 --- a/stdlib/importlib/metadata/__init__.pyi +++ b/stdlib/importlib/metadata/__init__.pyi @@ -139,7 +139,7 @@ if sys.version_info >= (3, 10) and sys.version_info < (3, 12): class Deprecated(Generic[_KT, _VT]): def __getitem__(self, name: _KT) -> _VT: ... @overload - def get(self, name: _KT) -> _VT | None: ... + def get(self, name: _KT, default: None = None) -> _VT | None: ... @overload def get(self, name: _KT, default: _T) -> _VT | _T: ... def __iter__(self) -> Iterator[_KT]: ...