Upgrading loguru 0.4 to 0.5
Breaking0.4.1 → 0.5.3Breaking1Security1New5Changed1Fixed14
SecurityImproper Privilege Management in Conda loguru prior to 0.5.3.GHSA-39ph-wr67-j4xq · CVE-2022-0338 ↗
BreakingUpgrade verdict
1 breaking change and a security fix.
In plain terms
- Once you create a logging level, you can no longer change its numeric severity value.
- Improper Privilege Management in Conda loguru prior to 0.5.3.
Must act 2 items need code or config changes
What you must change
Breaking1
Removes the ability to modify the severity 'no' of levels after they are added, to prevent surprising behavior.
logger.level()Security1
Improper Privilege Management in Conda loguru prior to 0.5.3.
API changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- removed:
class Catcher - removed:
variable Function - removed:
variable T - changed:
async method Logger.complete() -> None → method Logger.complete() -> AwaitableCompleter - changed:
field Record.extra: dict → field Record.extra: Dict[Any, Any] - changed:
method Logger.catch(exception: Union[Type[BaseException], Tuple[Type[BaseException], ...]]=…, *, level: Union[str, int]=…, reraise: bool=…, message: str=…) -> Catcher | (exception: Function=…) -> Function → method Logger.catch(exception: Union[Type[BaseException], Tuple[Type[BaseException], ...]]=…, *, level: Union[str, int]=…, reraise: bool=…, onerror: Optional[Callable[[BaseException], None]]=…, exclude: Optional[Union[Type[BaseException], Tuple[Type[BaseException], ...]]]=…, message: str=…) -> Catcher | (exception: _F) -> _F - changed:
method Logger.configure(*, handlers: Sequence[Dict[str, Any]]=…, levels: Optional[Sequence[LevelConfig]]=…, extra: Optional[dict]=…, patcher: Optional[PatcherFunction]=…, activation: Optional[Sequence[ActivationConfig]]=…) -> List[int] → method Logger.configure(*, handlers: Sequence[Dict[str, Any]]=…, levels: Optional[Sequence[LevelConfig]]=…, extra: Optional[Dict[Any, Any]]=…, patcher: Optional[PatcherFunction]=…, activation: Optional[Sequence[ActivationConfig]]=…) -> List[int] - changed:
method Logger.contextualize(**kwargs: Any) -> ContextManager → method Logger.contextualize(**kwargs: Any) -> Contextualizer - changed:
method Logger.opt(*, exception: Optional[Union[bool, ExcInfo, BaseException]]=…, record: bool=…, lazy: bool=…, colors: bool=…, raw: bool=…, depth: int=…, ansi: bool=…) -> Logger → method Logger.opt(*, exception: Optional[Union[bool, ExcInfo, BaseException]]=…, record: bool=…, lazy: bool=…, colors: bool=…, raw: bool=…, capture: bool=…, depth: int=…, ansi: bool=…) -> Logger - changed:
static method Logger.parse(file: Union[str, PathLike, TextIO, BinaryIO], pattern: Union[str, bytes, Pattern[str], Pattern[bytes]], *, cast: Union[dict, Callable[[dict], None]]=…, chunk: int=…) -> Generator[dict, None, None] → method Logger.parse(file: Union[str, PathLike[str], TextIO], pattern: Union[str, Pattern[str]], *, cast: Union[Dict[str, Callable[[str], Any]], Callable[[Dict[str, str]], None]]=…, chunk: int=…) -> Generator[Dict[str, Any], None, None] | (file: BinaryIO, pattern: Union[bytes, Pattern[bytes]], *, cast: Union[Dict[str, Callable[[bytes], Any]], Callable[[Dict[str, bytes]], None]]=…, chunk: int=…) ->… - added:
variable AwaitableCompleter - added:
variable Catcher - added:
variable Contextualizer