From 951c0b82e8feb2c9d9890a9869bd51ff172ff2be Mon Sep 17 00:00:00 2001 From: Brian Schubert Date: Thu, 7 Nov 2024 16:12:24 -0500 Subject: [PATCH] Update `logging.config.fileConfig` to accept any `Mapping` for defaults (#12973) --- stdlib/logging/config.pyi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stdlib/logging/config.pyi b/stdlib/logging/config.pyi index af57f3671..5c444e66c 100644 --- a/stdlib/logging/config.pyi +++ b/stdlib/logging/config.pyi @@ -1,6 +1,6 @@ import sys from _typeshed import StrOrBytesPath -from collections.abc import Callable, Hashable, Iterable, Sequence +from collections.abc import Callable, Hashable, Iterable, Mapping, Sequence from configparser import RawConfigParser from re import Pattern from threading import Thread @@ -63,7 +63,7 @@ def dictConfig(config: _DictConfigArgs | dict[str, Any]) -> None: ... if sys.version_info >= (3, 10): def fileConfig( fname: StrOrBytesPath | IO[str] | RawConfigParser, - defaults: dict[str, str] | None = None, + defaults: Mapping[str, str] | None = None, disable_existing_loggers: bool = True, encoding: str | None = None, ) -> None: ... @@ -71,7 +71,7 @@ if sys.version_info >= (3, 10): else: def fileConfig( fname: StrOrBytesPath | IO[str] | RawConfigParser, - defaults: dict[str, str] | None = None, + defaults: Mapping[str, str] | None = None, disable_existing_loggers: bool = True, ) -> None: ...