From 4ad4565ddd025570583f877ebdeb7c360509bf93 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Mon, 31 Aug 2020 15:06:20 +0530 Subject: Add a notice about Python 3.5 support This will be printed in bold at the end of interactive meson sub-commands that won't be parsed by a program. Specifically: setup, compile, test, and install. NOTICE: You are using [...] --- mesonbuild/mlog.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'mesonbuild/mlog.py') diff --git a/mesonbuild/mlog.py b/mesonbuild/mlog.py index 1e5a105..9c19427 100644 --- a/mesonbuild/mlog.py +++ b/mesonbuild/mlog.py @@ -255,8 +255,10 @@ def _log_error(severity: str, *rargs: T.Union[str, AnsiDecorator], # The typing requirements here are non-obvious. Lists are invariant, # therefore T.List[A] and T.List[T.Union[A, B]] are not able to be joined - if severity == 'warning': - label = [yellow('WARNING:')] # type: T.List[T.Union[str, AnsiDecorator]] + if severity == 'notice': + label = [bold('NOTICE:')] # type: T.List[T.Union[str, AnsiDecorator]] + elif severity == 'warning': + label = [yellow('WARNING:')] elif severity == 'error': label = [red('ERROR:')] elif severity == 'deprecation': @@ -295,6 +297,9 @@ def warning(*args: T.Union[str, AnsiDecorator], **kwargs: T.Any) -> None: def deprecation(*args: T.Union[str, AnsiDecorator], **kwargs: T.Any) -> None: return _log_error('deprecation', *args, **kwargs, is_error=True) +def notice(*args: T.Union[str, AnsiDecorator], **kwargs: T.Any) -> None: + return _log_error('notice', *args, **kwargs, is_error=False) + def get_relative_path(target: Path, current: Path) -> Path: """Get the path to target from current""" # Go up "current" until we find a common ancestor to target -- cgit v1.1