Update logging.config.fileConfig to accept any Mapping for defaults (#12973)

This commit is contained in:
Brian Schubert
2024-11-07 16:12:24 -05:00
committed by GitHub
parent 0d4a94803a
commit 951c0b82e8

View File

@@ -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: ...