Modernize logging (#5068)

This commit is contained in:
Sebastian Rittau
2021-03-23 03:26:43 +01:00
committed by GitHub
parent 758224b231
commit 0cea325bc7
7 changed files with 793 additions and 609 deletions

View File

@@ -1,32 +1,20 @@
import sys
from _typeshed import AnyPath, StrPath
from collections.abc import Callable
from configparser import RawConfigParser
from threading import Thread
from typing import IO, Any, Callable, Dict, Optional, Union
if sys.version_info >= (3,):
from configparser import RawConfigParser
else:
from ConfigParser import RawConfigParser
from typing import IO, Any, Optional, Union
if sys.version_info >= (3, 7):
_Path = AnyPath
else:
_Path = StrPath
def dictConfig(config: Dict[str, Any]) -> None: ...
if sys.version_info >= (3, 4):
def fileConfig(
fname: Union[_Path, IO[str], RawConfigParser],
defaults: Optional[Dict[str, str]] = ...,
disable_existing_loggers: bool = ...,
) -> None: ...
def listen(port: int = ..., verify: Optional[Callable[[bytes], Optional[bytes]]] = ...) -> Thread: ...
else:
def fileConfig(
fname: Union[str, IO[str]], defaults: Optional[Dict[str, str]] = ..., disable_existing_loggers: bool = ...
) -> None: ...
def listen(port: int = ...) -> Thread: ...
def dictConfig(config: dict[str, Any]) -> None: ...
def fileConfig(
fname: Union[_Path, IO[str], RawConfigParser],
defaults: Optional[dict[str, str]] = ...,
disable_existing_loggers: bool = ...,
) -> None: ...
def listen(port: int = ..., verify: Optional[Callable[[bytes], Optional[bytes]]] = ...) -> Thread: ...
def stopListening() -> None: ...