traitlets icon indicating copy to clipboard operation
traitlets copied to clipboard

Fix compatibility with python 3.14

Open arthurzam opened this issue 7 months ago • 2 comments

When running the test suite with python 3.14, we get this failure due to improvement of error messages

test log

======================================================================= FAILURES =======================================================================
_______________________________________________________ TestArgcomplete.test_complete_simple_app _______________________________________________________

self = _KVArgParser(prog='python3.14 -m pytest', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
action = _StoreAction(option_strings=['--Application.log_datefmt'], dest='Application.log_datefmt', nargs=None, const=None, def...one, required=False, help='The date format used by logging formatters for %(asctime)s', metavar=None, deprecated=False)

    def _check_help(self, action):
        if action.help and hasattr(self, "_get_formatter"):
            formatter = self._get_formatter()
            try:
>               formatter._expand_help(action)

action     = _StoreAction(option_strings=['--Application.log_datefmt'], dest='Application.log_datefmt', nargs=None, const=None, default='==SUPPRESS==', type=<class 'str'>, choices=None, required=False, help='The date format used by logging formatters for %(asctime)s', metavar=None, deprecated=False)
formatter  = <argparse.HelpFormatter object at 0x7f66d52f3050>
self       = _KVArgParser(prog='python3.14 -m pytest', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)

/usr/lib/python3.14/argparse.py:1753: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <argparse.HelpFormatter object at 0x7f66d52f3050>
action = _StoreAction(option_strings=['--Application.log_datefmt'], dest='Application.log_datefmt', nargs=None, const=None, def...one, required=False, help='The date format used by logging formatters for %(asctime)s', metavar=None, deprecated=False)

    def _expand_help(self, action):
        help_string = self._get_help_string(action)
        if '%' not in help_string:
            return help_string
        params = dict(vars(action), prog=self._prog)
        for name in list(params):
            value = params[name]
            if value is SUPPRESS:
                del params[name]
            elif hasattr(value, '__name__'):
                params[name] = value.__name__
        if params.get('choices') is not None:
            params['choices'] = ', '.join(map(str, params['choices']))
>       return help_string % params
E       KeyError: 'asctime'

action     = _StoreAction(option_strings=['--Application.log_datefmt'], dest='Application.log_datefmt', nargs=None, const=None, default='==SUPPRESS==', type=<class 'str'>, choices=None, required=False, help='The date format used by logging formatters for %(asctime)s', metavar=None, deprecated=False)
help_string = 'The date format used by logging formatters for %(asctime)s'
name       = 'prog'
params     = {'choices': None,
 'const': None,
 'deprecated': False,
 'dest': 'Application.log_datefmt',
 'help': 'The date format used by logging formatters for %(asctime)s',
 'metavar': None,
 'nargs': None,
 'option_strings': ['--Application.log_datefmt'],
 'prog': 'python3.14 -m pytest',
 'required': False,
 'type': 'str'}
self       = <argparse.HelpFormatter object at 0x7f66d52f3050>
value      = 'python3.14 -m pytest'

/usr/lib/python3.14/argparse.py:687: KeyError

The above exception was the direct cause of the following exception:

self = <tests.config.test_argcomplete.TestArgcomplete object at 0x7f66d5545090>, argcomplete_on = None

    def test_complete_simple_app(self, argcomplete_on):
        app = ArgcompleteApp()
        expected = [
            "--help",
            "--debug",
            "--show-config",
            "--show-config-json",
            "--log-level",
            "--Application.",
            "--ArgcompleteApp.",
        ]
        assert set(self.run_completer(app, "app --")) == set(expected)
    
        # completing class traits
>       assert set(self.run_completer(app, "app --App")) > {
            "--Application.show_config",
            "--Application.log_level",
            "--Application.log_format",
        }

app        = <tests.config.test_argcomplete.ArgcompleteApp object at 0x7f66d52bd7f0>
argcomplete_on = None
expected   = ['--help',
 '--debug',
 '--show-config',
 '--show-config-json',
 '--log-level',
 '--Application.',
 '--ArgcompleteApp.']
self       = <tests.config.test_argcomplete.TestArgcomplete object at 0x7f66d5545090>

tests/config/test_argcomplete.py:148: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/config/test_argcomplete.py:127: in run_completer
    app.initialize()
        app        = <tests.config.test_argcomplete.ArgcompleteApp object at 0x7f66d52bd7f0>
        cm         = <ExceptionInfo for raises contextmanager>
        command    = 'app --App'
        kwargs     = {}
        point      = '9'
        self       = <tests.config.test_argcomplete.TestArgcomplete object at 0x7f66d5545090>
        strio      = <_io.StringIO object at 0x7f66d4d0e950>
traitlets/config/application.py:118: in inner
    return method(app, *args, **kwargs)
        app        = <tests.config.test_argcomplete.ArgcompleteApp object at 0x7f66d52bd7f0>
        args       = ()
        kwargs     = {}
        method     = <function Application.initialize at 0x7f66d5521170>
traitlets/config/application.py:465: in initialize
    self.parse_command_line(argv)
        argv       = None
        self       = <tests.config.test_argcomplete.ArgcompleteApp object at 0x7f66d52bd7f0>
traitlets/config/application.py:118: in inner
    return method(app, *args, **kwargs)
        app        = <tests.config.test_argcomplete.ArgcompleteApp object at 0x7f66d52bd7f0>
        args       = (None,)
        kwargs     = {}
        method     = <function Application.parse_command_line at 0x7f66d5523530>
traitlets/config/application.py:881: in parse_command_line
    self.cli_config = deepcopy(loader.load_config())
        aliases    = {'log-level': 'ArgcompleteApp.log_level'}
        argv       = ['-vv',
 '-ra',
 '-l',
 '-Wdefault',
 '-Werror::pytest.PytestUnhandledCoroutineWarning',
 '--color=yes',
 '-o',
 'console_output_style=count',
 '-o',
 'tmp_path_retention_count=0',
 '-o',
 'tmp_path_retention_policy=failed',
 '--ignore',
 'tests/test_typing.py',
 '-p',
 'pytest_mock']
        classes    = [<class 'traitlets.config.application.Application'>,
 <class 'tests.config.test_argcomplete.ArgcompleteApp'>]
        flags      = {'debug': ({'ArgcompleteApp': {'log_level': 10}},
           'Set log-level to debug, for the most verbose logging.'),
 'show-config': ({'ArgcompleteApp': {'show_config': True}},
                 "Show the application's configuration (human-readable "
                 'format)'),
 'show-config-json': ({'ArgcompleteApp': {'show_config_json': True}},
                      "Show the application's configuration (json format)")}
        interpreted_argv = ['-vv',
 '-ra',
 '-l',
 '-Wdefault',
 '-Werror::pytest.PytestUnhandledCoroutineWarning',
 '--color=yes',
 '-o',
 'console_output_style=count',
 '-o',
 'tmp_path_retention_count=0',
 '-o',
 'tmp_path_retention_policy=failed',
 '--ignore',
 'tests/test_typing.py',
 '-p',
 'pytest_mock']
        loader     = <traitlets.config.loader.KVArgParseConfigLoader object at 0x7f66d532f890>
        self       = <tests.config.test_argcomplete.ArgcompleteApp object at 0x7f66d52bd7f0>
traitlets/config/loader.py:894: in load_config
    self._argcomplete(self.classes, self.subcommands)
        aliases    = None
        argv       = ['-vv',
 '-ra',
 '-l',
 '-Wdefault',
 '-Werror::pytest.PytestUnhandledCoroutineWarning',
 '--color=yes',
 '-o',
 'console_output_style=count',
 '-o',
 'tmp_path_retention_count=0',
 '-o',
 'tmp_path_retention_policy=failed',
 '--ignore',
 'tests/test_typing.py',
 '-p',
 'pytest_mock']
        classes    = None
        flags      = <Sentinel deprecated>
        self       = <traitlets.config.loader.KVArgParseConfigLoader object at 0x7f66d532f890>
traitlets/config/loader.py:1139: in _argcomplete
    finder(self.parser, **getattr(self, "_argcomplete_kwargs", {}))
        argcomplete = <module 'argcomplete' from '/usr/lib/python3.14/site-packages/argcomplete/__init__.py'>
        argcomplete_config = <module 'traitlets.config.argcomplete_config' from '/var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/config/argcomplete_config.py'>
        classes    = [<class 'traitlets.config.application.Application'>,
 <class 'tests.config.test_argcomplete.ArgcompleteApp'>]
        finder     = <traitlets.config.argcomplete_config.ExtendedCompletionFinder object at 0x7f66d531f960>
        self       = <traitlets.config.loader.KVArgParseConfigLoader object at 0x7f66d532f890>
        subcommands = {}
/usr/lib/python3.14/site-packages/argcomplete/finders.py:174: in __call__
    completions = self._get_completions(comp_words, cword_prefix, cword_prequote, last_wordbreak_pos)
        always_complete_options = True
        append_space = None
        argument_parser = _KVArgParser(prog='python3.14 -m pytest', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
        comp_line  = 'app --App'
        comp_point = 9
        comp_words = ['app']
        cword_prefix = '--App'
        cword_prequote = ''
        cword_suffix = ''
        default_completer = <argcomplete.completers.FilesCompleter object at 0x7f66d5544e10>
        dfs        = None
        exclude    = None
        exit_method = <bound method CustomError.exit of <class 'tests.config.test_argcomplete.CustomError'>>
        ifs        = '\x0b'
        last_wordbreak_pos = None
        output_stream = <_io.StringIO object at 0x7f66d4d0e950>
        print_suppressed = False
        self       = <traitlets.config.argcomplete_config.ExtendedCompletionFinder object at 0x7f66d531f960>
        start      = 0
        validator  = None
traitlets/config/argcomplete_config.py:175: in _get_completions
    self.inject_class_to_parser(matched_cls)
        __class__  = <class 'traitlets.config.argcomplete_config.ExtendedCompletionFinder'>
        args       = ('', None)
        comp_words = ['app']
        cword_prefix = '--App'
        is_option  = True
        matched_cls = <class 'traitlets.config.application.Application'>
        matched_completions = [(<class 'traitlets.config.application.Application'>, '--Application.')]
        prefix_chars = '-'
        self       = <traitlets.config.argcomplete_config.ExtendedCompletionFinder object at 0x7f66d531f960>
traitlets/config/argcomplete_config.py:138: in inject_class_to_parser
    self._parser.add_argument(  # type: ignore[attr-defined]
        cls        = <class 'traitlets.config.application.Application'>
        completer  = None
        multiplicity = None
        self       = <traitlets.config.argcomplete_config.ExtendedCompletionFinder object at 0x7f66d531f960>
        trait      = <traitlets.traitlets.Unicode object at 0x7f66d53ae250>
        traitname  = 'log_datefmt'
/usr/lib/python3.14/argparse.py:1567: in add_argument
    self._check_help(action)
        action     = _StoreAction(option_strings=['--Application.log_datefmt'], dest='Application.log_datefmt', nargs=None, const=None, default='==SUPPRESS==', type=<class 'str'>, choices=None, required=False, help='The date format used by logging formatters for %(asctime)s', metavar=None, deprecated=False)
        action_class = <class 'argparse._StoreAction'>
        action_name = None
        args       = ('--Application.log_datefmt',)
        chars      = '-'
        dest       = 'Application.log_datefmt'
        formatter  = <argparse.HelpFormatter object at 0x7f66d52f31d0>
        kwargs     = {'default': '==SUPPRESS==',
 'dest': 'Application.log_datefmt',
 'help': 'The date format used by logging formatters for %(asctime)s',
 'nargs': None,
 'option_strings': ['--Application.log_datefmt'],
 'type': <class 'str'>}
        self       = _KVArgParser(prog='python3.14 -m pytest', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
        type_func  = <class 'str'>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = _KVArgParser(prog='python3.14 -m pytest', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
action = _StoreAction(option_strings=['--Application.log_datefmt'], dest='Application.log_datefmt', nargs=None, const=None, def...one, required=False, help='The date format used by logging formatters for %(asctime)s', metavar=None, deprecated=False)

    def _check_help(self, action):
        if action.help and hasattr(self, "_get_formatter"):
            formatter = self._get_formatter()
            try:
                formatter._expand_help(action)
            except (ValueError, TypeError, KeyError) as exc:
>               raise ValueError('badly formed help string') from exc
E               ValueError: badly formed help string

action     = _StoreAction(option_strings=['--Application.log_datefmt'], dest='Application.log_datefmt', nargs=None, const=None, default='==SUPPRESS==', type=<class 'str'>, choices=None, required=False, help='The date format used by logging formatters for %(asctime)s', metavar=None, deprecated=False)
formatter  = <argparse.HelpFormatter object at 0x7f66d52f3050>
self       = _KVArgParser(prog='python3.14 -m pytest', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)

/usr/lib/python3.14/argparse.py:1755: ValueError
___________________________________________________ TestArgcomplete.test_complete_custom_completers ____________________________________________________

self = _KVArgParser(prog='python3.14 -m pytest', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
action = _StoreAction(option_strings=['--Application.log_datefmt'], dest='Application.log_datefmt', nargs=None, const=None, def...one, required=False, help='The date format used by logging formatters for %(asctime)s', metavar=None, deprecated=False)

    def _check_help(self, action):
        if action.help and hasattr(self, "_get_formatter"):
            formatter = self._get_formatter()
            try:
>               formatter._expand_help(action)

action     = _StoreAction(option_strings=['--Application.log_datefmt'], dest='Application.log_datefmt', nargs=None, const=None, default='==SUPPRESS==', type=<class 'str'>, choices=None, required=False, help='The date format used by logging formatters for %(asctime)s', metavar=None, deprecated=False)
formatter  = <argparse.HelpFormatter object at 0x7f66d532da90>
self       = _KVArgParser(prog='python3.14 -m pytest', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)

/usr/lib/python3.14/argparse.py:1753: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <argparse.HelpFormatter object at 0x7f66d532da90>
action = _StoreAction(option_strings=['--Application.log_datefmt'], dest='Application.log_datefmt', nargs=None, const=None, def...one, required=False, help='The date format used by logging formatters for %(asctime)s', metavar=None, deprecated=False)

    def _expand_help(self, action):
        help_string = self._get_help_string(action)
        if '%' not in help_string:
            return help_string
        params = dict(vars(action), prog=self._prog)
        for name in list(params):
            value = params[name]
            if value is SUPPRESS:
                del params[name]
            elif hasattr(value, '__name__'):
                params[name] = value.__name__
        if params.get('choices') is not None:
            params['choices'] = ', '.join(map(str, params['choices']))
>       return help_string % params
E       KeyError: 'asctime'

action     = _StoreAction(option_strings=['--Application.log_datefmt'], dest='Application.log_datefmt', nargs=None, const=None, default='==SUPPRESS==', type=<class 'str'>, choices=None, required=False, help='The date format used by logging formatters for %(asctime)s', metavar=None, deprecated=False)
help_string = 'The date format used by logging formatters for %(asctime)s'
name       = 'prog'
params     = {'choices': None,
 'const': None,
 'deprecated': False,
 'dest': 'Application.log_datefmt',
 'help': 'The date format used by logging formatters for %(asctime)s',
 'metavar': None,
 'nargs': None,
 'option_strings': ['--Application.log_datefmt'],
 'prog': 'python3.14 -m pytest',
 'required': False,
 'type': 'str'}
self       = <argparse.HelpFormatter object at 0x7f66d532da90>
value      = 'python3.14 -m pytest'

/usr/lib/python3.14/argparse.py:687: KeyError

The above exception was the direct cause of the following exception:

self = <tests.config.test_argcomplete.TestArgcomplete object at 0x7f66d5544f50>, argcomplete_on = None

    def test_complete_custom_completers(self, argcomplete_on):
        app = ArgcompleteApp()
        # test pre-defined completers for Bool/Enum
>       assert set(self.run_completer(app, "app --Application.log_level=")) > {"DEBUG", "INFO"}

app        = <tests.config.test_argcomplete.ArgcompleteApp object at 0x7f66d549ad50>
argcomplete_on = None
self       = <tests.config.test_argcomplete.TestArgcomplete object at 0x7f66d5544f50>

tests/config/test_argcomplete.py:157: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/config/test_argcomplete.py:127: in run_completer
    app.initialize()
        app        = <tests.config.test_argcomplete.ArgcompleteApp object at 0x7f66d549ad50>
        cm         = <ExceptionInfo for raises contextmanager>
        command    = 'app --Application.log_level='
        kwargs     = {}
        point      = '28'
        self       = <tests.config.test_argcomplete.TestArgcomplete object at 0x7f66d5544f50>
        strio      = <_io.StringIO object at 0x7f66d4dbf760>
traitlets/config/application.py:118: in inner
    return method(app, *args, **kwargs)
        app        = <tests.config.test_argcomplete.ArgcompleteApp object at 0x7f66d549ad50>
        args       = ()
        kwargs     = {}
        method     = <function Application.initialize at 0x7f66d5521170>
traitlets/config/application.py:465: in initialize
    self.parse_command_line(argv)
        argv       = None
        self       = <tests.config.test_argcomplete.ArgcompleteApp object at 0x7f66d549ad50>
traitlets/config/application.py:118: in inner
    return method(app, *args, **kwargs)
        app        = <tests.config.test_argcomplete.ArgcompleteApp object at 0x7f66d549ad50>
        args       = (None,)
        kwargs     = {}
        method     = <function Application.parse_command_line at 0x7f66d5523530>
traitlets/config/application.py:881: in parse_command_line
    self.cli_config = deepcopy(loader.load_config())
        aliases    = {'log-level': 'ArgcompleteApp.log_level'}
        argv       = ['-vv',
 '-ra',
 '-l',
 '-Wdefault',
 '-Werror::pytest.PytestUnhandledCoroutineWarning',
 '--color=yes',
 '-o',
 'console_output_style=count',
 '-o',
 'tmp_path_retention_count=0',
 '-o',
 'tmp_path_retention_policy=failed',
 '--ignore',
 'tests/test_typing.py',
 '-p',
 'pytest_mock']
        classes    = [<class 'traitlets.config.application.Application'>,
 <class 'tests.config.test_argcomplete.ArgcompleteApp'>]
        flags      = {'debug': ({'ArgcompleteApp': {'log_level': 10}},
           'Set log-level to debug, for the most verbose logging.'),
 'show-config': ({'ArgcompleteApp': {'show_config': True}},
                 "Show the application's configuration (human-readable "
                 'format)'),
 'show-config-json': ({'ArgcompleteApp': {'show_config_json': True}},
                      "Show the application's configuration (json format)")}
        interpreted_argv = ['-vv',
 '-ra',
 '-l',
 '-Wdefault',
 '-Werror::pytest.PytestUnhandledCoroutineWarning',
 '--color=yes',
 '-o',
 'console_output_style=count',
 '-o',
 'tmp_path_retention_count=0',
 '-o',
 'tmp_path_retention_policy=failed',
 '--ignore',
 'tests/test_typing.py',
 '-p',
 'pytest_mock']
        loader     = <traitlets.config.loader.KVArgParseConfigLoader object at 0x7f66d532f710>
        self       = <tests.config.test_argcomplete.ArgcompleteApp object at 0x7f66d549ad50>
traitlets/config/loader.py:894: in load_config
    self._argcomplete(self.classes, self.subcommands)
        aliases    = None
        argv       = ['-vv',
 '-ra',
 '-l',
 '-Wdefault',
 '-Werror::pytest.PytestUnhandledCoroutineWarning',
 '--color=yes',
 '-o',
 'console_output_style=count',
 '-o',
 'tmp_path_retention_count=0',
 '-o',
 'tmp_path_retention_policy=failed',
 '--ignore',
 'tests/test_typing.py',
 '-p',
 'pytest_mock']
        classes    = None
        flags      = <Sentinel deprecated>
        self       = <traitlets.config.loader.KVArgParseConfigLoader object at 0x7f66d532f710>
traitlets/config/loader.py:1139: in _argcomplete
    finder(self.parser, **getattr(self, "_argcomplete_kwargs", {}))
        argcomplete = <module 'argcomplete' from '/usr/lib/python3.14/site-packages/argcomplete/__init__.py'>
        argcomplete_config = <module 'traitlets.config.argcomplete_config' from '/var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/config/argcomplete_config.py'>
        classes    = [<class 'traitlets.config.application.Application'>,
 <class 'tests.config.test_argcomplete.ArgcompleteApp'>]
        finder     = <traitlets.config.argcomplete_config.ExtendedCompletionFinder object at 0x7f66d52e28e0>
        self       = <traitlets.config.loader.KVArgParseConfigLoader object at 0x7f66d532f710>
        subcommands = {}
/usr/lib/python3.14/site-packages/argcomplete/finders.py:174: in __call__
    completions = self._get_completions(comp_words, cword_prefix, cword_prequote, last_wordbreak_pos)
        always_complete_options = True
        append_space = None
        argument_parser = _KVArgParser(prog='python3.14 -m pytest', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
        comp_line  = 'app --Application.log_level='
        comp_point = 28
        comp_words = ['app', '--Application.log_level']
        cword_prefix = '--Application.log_level='
        cword_prequote = ''
        cword_suffix = ''
        default_completer = <argcomplete.completers.FilesCompleter object at 0x7f66d5544e10>
        dfs        = None
        exclude    = None
        exit_method = <bound method CustomError.exit of <class 'tests.config.test_argcomplete.CustomError'>>
        ifs        = '\x0b'
        last_wordbreak_pos = 23
        output_stream = <_io.StringIO object at 0x7f66d4dbf760>
        print_suppressed = False
        self       = <traitlets.config.argcomplete_config.ExtendedCompletionFinder object at 0x7f66d52e28e0>
        start      = 0
        validator  = None
traitlets/config/argcomplete_config.py:175: in _get_completions
    self.inject_class_to_parser(matched_cls)
        __class__  = <class 'traitlets.config.argcomplete_config.ExtendedCompletionFinder'>
        args       = ('', 23)
        comp_words = ['app', '--Application.log_level']
        cword_prefix = '--Application.log_level='
        is_option  = True
        matched_cls = <class 'traitlets.config.application.Application'>
        matched_completions = [(<class 'traitlets.config.application.Application'>, '--Application.')]
        prefix_chars = '-'
        self       = <traitlets.config.argcomplete_config.ExtendedCompletionFinder object at 0x7f66d52e28e0>
traitlets/config/argcomplete_config.py:138: in inject_class_to_parser
    self._parser.add_argument(  # type: ignore[attr-defined]
        cls        = <class 'traitlets.config.application.Application'>
        completer  = None
        multiplicity = None
        self       = <traitlets.config.argcomplete_config.ExtendedCompletionFinder object at 0x7f66d52e28e0>
        trait      = <traitlets.traitlets.Unicode object at 0x7f66d53ae250>
        traitname  = 'log_datefmt'
/usr/lib/python3.14/argparse.py:1567: in add_argument
    self._check_help(action)
        action     = _StoreAction(option_strings=['--Application.log_datefmt'], dest='Application.log_datefmt', nargs=None, const=None, default='==SUPPRESS==', type=<class 'str'>, choices=None, required=False, help='The date format used by logging formatters for %(asctime)s', metavar=None, deprecated=False)
        action_class = <class 'argparse._StoreAction'>
        action_name = None
        args       = ('--Application.log_datefmt',)
        chars      = '-'
        dest       = 'Application.log_datefmt'
        formatter  = <argparse.HelpFormatter object at 0x7f66d532d910>
        kwargs     = {'default': '==SUPPRESS==',
 'dest': 'Application.log_datefmt',
 'help': 'The date format used by logging formatters for %(asctime)s',
 'nargs': None,
 'option_strings': ['--Application.log_datefmt'],
 'type': <class 'str'>}
        self       = _KVArgParser(prog='python3.14 -m pytest', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
        type_func  = <class 'str'>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = _KVArgParser(prog='python3.14 -m pytest', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
action = _StoreAction(option_strings=['--Application.log_datefmt'], dest='Application.log_datefmt', nargs=None, const=None, def...one, required=False, help='The date format used by logging formatters for %(asctime)s', metavar=None, deprecated=False)

    def _check_help(self, action):
        if action.help and hasattr(self, "_get_formatter"):
            formatter = self._get_formatter()
            try:
                formatter._expand_help(action)
            except (ValueError, TypeError, KeyError) as exc:
>               raise ValueError('badly formed help string') from exc
E               ValueError: badly formed help string

action     = _StoreAction(option_strings=['--Application.log_datefmt'], dest='Application.log_datefmt', nargs=None, const=None, default='==SUPPRESS==', type=<class 'str'>, choices=None, required=False, help='The date format used by logging formatters for %(asctime)s', metavar=None, deprecated=False)
formatter  = <argparse.HelpFormatter object at 0x7f66d532da90>
self       = _KVArgParser(prog='python3.14 -m pytest', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)

/usr/lib/python3.14/argparse.py:1755: ValueError
__________________________________________________ TestArgcomplete.test_complete_subcommands_subapp1 ___________________________________________________

self = _KVArgParser(prog='python3.14 -m pytest', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
action = _StoreAction(option_strings=['--SubApp1.log_datefmt'], dest='SubApp1.log_datefmt', nargs=None, const=None, default='==...one, required=False, help='The date format used by logging formatters for %(asctime)s', metavar=None, deprecated=False)

    def _check_help(self, action):
        if action.help and hasattr(self, "_get_formatter"):
            formatter = self._get_formatter()
            try:
>               formatter._expand_help(action)

action     = _StoreAction(option_strings=['--SubApp1.log_datefmt'], dest='SubApp1.log_datefmt', nargs=None, const=None, default='==SUPPRESS==', type=<class 'str'>, choices=None, required=False, help='The date format used by logging formatters for %(asctime)s', metavar=None, deprecated=False)
formatter  = <argparse.HelpFormatter object at 0x7f66d52f0950>
self       = _KVArgParser(prog='python3.14 -m pytest', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)

/usr/lib/python3.14/argparse.py:1753: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <argparse.HelpFormatter object at 0x7f66d52f0950>
action = _StoreAction(option_strings=['--SubApp1.log_datefmt'], dest='SubApp1.log_datefmt', nargs=None, const=None, default='==...one, required=False, help='The date format used by logging formatters for %(asctime)s', metavar=None, deprecated=False)

    def _expand_help(self, action):
        help_string = self._get_help_string(action)
        if '%' not in help_string:
            return help_string
        params = dict(vars(action), prog=self._prog)
        for name in list(params):
            value = params[name]
            if value is SUPPRESS:
                del params[name]
            elif hasattr(value, '__name__'):
                params[name] = value.__name__
        if params.get('choices') is not None:
            params['choices'] = ', '.join(map(str, params['choices']))
>       return help_string % params
E       KeyError: 'asctime'

action     = _StoreAction(option_strings=['--SubApp1.log_datefmt'], dest='SubApp1.log_datefmt', nargs=None, const=None, default='==SUPPRESS==', type=<class 'str'>, choices=None, required=False, help='The date format used by logging formatters for %(asctime)s', metavar=None, deprecated=False)
help_string = 'The date format used by logging formatters for %(asctime)s'
name       = 'prog'
params     = {'choices': None,
 'const': None,
 'deprecated': False,
 'dest': 'SubApp1.log_datefmt',
 'help': 'The date format used by logging formatters for %(asctime)s',
 'metavar': None,
 'nargs': None,
 'option_strings': ['--SubApp1.log_datefmt'],
 'prog': 'python3.14 -m pytest',
 'required': False,
 'type': 'str'}
self       = <argparse.HelpFormatter object at 0x7f66d52f0950>
value      = 'python3.14 -m pytest'

/usr/lib/python3.14/argparse.py:687: KeyError

The above exception was the direct cause of the following exception:

self = <tests.config.test_argcomplete.TestArgcomplete object at 0x7f66d5518510>, argcomplete_on = None

    def test_complete_subcommands_subapp1(self, argcomplete_on):
        # subcommand handling modifies _ARGCOMPLETE env var global state, so
        # only can test one completion per unit test
        app = MainApp()
        try:
>           assert set(self.run_completer(app, "app subapp1 --Sub")) > {
                "--SubApp1.show_config",
                "--SubApp1.log_level",
                "--SubApp1.log_format",
            }

app        = <tests.config.test_argcomplete.MainApp object at 0x7f66d526f250>
argcomplete_on = None
self       = <tests.config.test_argcomplete.TestArgcomplete object at 0x7f66d5518510>

tests/config/test_argcomplete.py:198: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/config/test_argcomplete.py:127: in run_completer
    app.initialize()
        app        = <tests.config.test_argcomplete.MainApp object at 0x7f66d526f250>
        cm         = <ExceptionInfo for raises contextmanager>
        command    = 'app subapp1 --Sub'
        kwargs     = {}
        point      = '17'
        self       = <tests.config.test_argcomplete.TestArgcomplete object at 0x7f66d5518510>
        strio      = <_io.StringIO object at 0x7f66d4dbff40>
traitlets/config/application.py:118: in inner
    return method(app, *args, **kwargs)
        app        = <tests.config.test_argcomplete.MainApp object at 0x7f66d526f250>
        args       = ()
        kwargs     = {}
        method     = <function Application.initialize at 0x7f66d5521170>
traitlets/config/application.py:465: in initialize
    self.parse_command_line(argv)
        argv       = None
        self       = <tests.config.test_argcomplete.MainApp object at 0x7f66d526f250>
traitlets/config/application.py:118: in inner
    return method(app, *args, **kwargs)
        app        = <tests.config.test_argcomplete.MainApp object at 0x7f66d526f250>
        args       = (None,)
        kwargs     = {}
        method     = <function Application.parse_command_line at 0x7f66d5523530>
traitlets/config/application.py:857: in parse_command_line
    return self.initialize_subcommand(subc, subargv)
        argv       = ['subapp1']
        self       = <tests.config.test_argcomplete.MainApp object at 0x7f66d526f250>
        subargv    = []
        subc       = 'subapp1'
traitlets/config/application.py:118: in inner
    return method(app, *args, **kwargs)
        app        = <tests.config.test_argcomplete.MainApp object at 0x7f66d526f250>
        args       = ('subapp1', [])
        kwargs     = {}
        method     = <function Application.initialize_subcommand at 0x7f66d5522da0>
traitlets/config/application.py:721: in initialize_subcommand
    self.subapp.initialize(argv)
        _          = 'First subapp'
        argv       = []
        self       = <tests.config.test_argcomplete.MainApp object at 0x7f66d526f250>
        subapp     = <class 'tests.config.test_argcomplete.SubApp1'>
        subc       = 'subapp1'
        val        = (<class 'tests.config.test_argcomplete.SubApp1'>, 'First subapp')
traitlets/config/application.py:118: in inner
    return method(app, *args, **kwargs)
        app        = <tests.config.test_argcomplete.SubApp1 object at 0x7f66d52bfb60>
        args       = ([],)
        kwargs     = {}
        method     = <function Application.initialize at 0x7f66d5521170>
traitlets/config/application.py:465: in initialize
    self.parse_command_line(argv)
        argv       = []
        self       = <tests.config.test_argcomplete.SubApp1 object at 0x7f66d52bfb60>
traitlets/config/application.py:118: in inner
    return method(app, *args, **kwargs)
        app        = <tests.config.test_argcomplete.SubApp1 object at 0x7f66d52bfb60>
        args       = ([],)
        kwargs     = {}
        method     = <function Application.parse_command_line at 0x7f66d5523530>
traitlets/config/application.py:881: in parse_command_line
    self.cli_config = deepcopy(loader.load_config())
        aliases    = {'log-level': 'SubApp1.log_level'}
        argv       = []
        classes    = [<class 'traitlets.config.application.Application'>,
 <class 'tests.config.test_argcomplete.ArgcompleteApp'>,
 <class 'tests.config.test_argcomplete.SubApp1'>]
        flags      = {'debug': ({'SubApp1': {'log_level': 10}},
           'Set log-level to debug, for the most verbose logging.'),
 'show-config': ({'SubApp1': {'show_config': True}},
                 "Show the application's configuration (human-readable "
                 'format)'),
 'show-config-json': ({'SubApp1': {'show_config_json': True}},
                      "Show the application's configuration (json format)")}
        interpreted_argv = []
        loader     = <traitlets.config.loader.KVArgParseConfigLoader object at 0x7f66d532e150>
        self       = <tests.config.test_argcomplete.SubApp1 object at 0x7f66d52bfb60>
traitlets/config/loader.py:894: in load_config
    self._argcomplete(self.classes, self.subcommands)
        aliases    = None
        argv       = []
        classes    = None
        flags      = <Sentinel deprecated>
        self       = <traitlets.config.loader.KVArgParseConfigLoader object at 0x7f66d532e150>
traitlets/config/loader.py:1139: in _argcomplete
    finder(self.parser, **getattr(self, "_argcomplete_kwargs", {}))
        argcomplete = <module 'argcomplete' from '/usr/lib/python3.14/site-packages/argcomplete/__init__.py'>
        argcomplete_config = <module 'traitlets.config.argcomplete_config' from '/var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/config/argcomplete_config.py'>
        classes    = [<class 'traitlets.config.application.Application'>,
 <class 'tests.config.test_argcomplete.ArgcompleteApp'>,
 <class 'tests.config.test_argcomplete.SubApp1'>]
        finder     = <traitlets.config.argcomplete_config.ExtendedCompletionFinder object at 0x7f66d53159c0>
        self       = <traitlets.config.loader.KVArgParseConfigLoader object at 0x7f66d532e150>
        subcommands = {}
/usr/lib/python3.14/site-packages/argcomplete/finders.py:174: in __call__
    completions = self._get_completions(comp_words, cword_prefix, cword_prequote, last_wordbreak_pos)
        always_complete_options = True
        append_space = None
        argument_parser = _KVArgParser(prog='python3.14 -m pytest', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
        comp_line  = 'app subapp1 --Sub'
        comp_point = 17
        comp_words = ['subapp1']
        cword_prefix = '--Sub'
        cword_prequote = ''
        cword_suffix = ''
        default_completer = <argcomplete.completers.FilesCompleter object at 0x7f66d5544e10>
        dfs        = None
        exclude    = None
        exit_method = <bound method CustomError.exit of <class 'tests.config.test_argcomplete.CustomError'>>
        ifs        = '\x0b'
        last_wordbreak_pos = None
        output_stream = <_io.StringIO object at 0x7f66d4dbff40>
        print_suppressed = False
        self       = <traitlets.config.argcomplete_config.ExtendedCompletionFinder object at 0x7f66d53159c0>
        start      = 1
        validator  = None
traitlets/config/argcomplete_config.py:175: in _get_completions
    self.inject_class_to_parser(matched_cls)
        __class__  = <class 'traitlets.config.argcomplete_config.ExtendedCompletionFinder'>
        args       = ('', None)
        comp_words = ['subapp1']
        cword_prefix = '--Sub'
        is_option  = True
        matched_cls = <class 'tests.config.test_argcomplete.SubApp1'>
        matched_completions = [(<class 'tests.config.test_argcomplete.SubApp1'>, '--SubApp1.')]
        prefix_chars = '-'
        self       = <traitlets.config.argcomplete_config.ExtendedCompletionFinder object at 0x7f66d53159c0>
traitlets/config/argcomplete_config.py:138: in inject_class_to_parser
    self._parser.add_argument(  # type: ignore[attr-defined]
        cls        = <class 'tests.config.test_argcomplete.SubApp1'>
        completer  = None
        multiplicity = None
        self       = <traitlets.config.argcomplete_config.ExtendedCompletionFinder object at 0x7f66d53159c0>
        trait      = <traitlets.traitlets.Unicode object at 0x7f66d53ae250>
        traitname  = 'log_datefmt'
/usr/lib/python3.14/argparse.py:1567: in add_argument
    self._check_help(action)
        action     = _StoreAction(option_strings=['--SubApp1.log_datefmt'], dest='SubApp1.log_datefmt', nargs=None, const=None, default='==SUPPRESS==', type=<class 'str'>, choices=None, required=False, help='The date format used by logging formatters for %(asctime)s', metavar=None, deprecated=False)
        action_class = <class 'argparse._StoreAction'>
        action_name = None
        args       = ('--SubApp1.log_datefmt',)
        chars      = '-'
        dest       = 'SubApp1.log_datefmt'
        formatter  = <argparse.HelpFormatter object at 0x7f66d52f0890>
        kwargs     = {'default': '==SUPPRESS==',
 'dest': 'SubApp1.log_datefmt',
 'help': 'The date format used by logging formatters for %(asctime)s',
 'nargs': None,
 'option_strings': ['--SubApp1.log_datefmt'],
 'type': <class 'str'>}
        self       = _KVArgParser(prog='python3.14 -m pytest', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
        type_func  = <class 'str'>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = _KVArgParser(prog='python3.14 -m pytest', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
action = _StoreAction(option_strings=['--SubApp1.log_datefmt'], dest='SubApp1.log_datefmt', nargs=None, const=None, default='==...one, required=False, help='The date format used by logging formatters for %(asctime)s', metavar=None, deprecated=False)

    def _check_help(self, action):
        if action.help and hasattr(self, "_get_formatter"):
            formatter = self._get_formatter()
            try:
                formatter._expand_help(action)
            except (ValueError, TypeError, KeyError) as exc:
>               raise ValueError('badly formed help string') from exc
E               ValueError: badly formed help string

action     = _StoreAction(option_strings=['--SubApp1.log_datefmt'], dest='SubApp1.log_datefmt', nargs=None, const=None, default='==SUPPRESS==', type=<class 'str'>, choices=None, required=False, help='The date format used by logging formatters for %(asctime)s', metavar=None, deprecated=False)
formatter  = <argparse.HelpFormatter object at 0x7f66d52f0950>
self       = _KVArgParser(prog='python3.14 -m pytest', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)

/usr/lib/python3.14/argparse.py:1755: ValueError
=================================================================== warnings summary ===================================================================
tests/_warnings.py::tests._warnings.all_warnings
  <doctest tests._warnings.all_warnings[1]>:2: RuntimeWarning: bar

tests/config/test_application.py::test_deprecated_notifier
  /var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/tests/config/test_application.py:715: DeprecationWarning: DeprecatedApp._config_changed is deprecated in traitlets 4.1: use @observe and @unobserve instead.
    def _config_changed(self, name, old, new):

tests/config/test_application.py::test_deprecated_notifier
  /var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/traitlets.py:1131: DeprecationWarning: A parent of DeprecatedApp._config_changed has adopted the new (traitlets 4.1) @observe(change) API
    warn(

tests/config/test_configurable.py::test_logger_adapter
  /usr/lib/python3.14/site-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored while calling deallocator <function Application.__del__ at 0x7f66d5528460>: None
  
  Traceback (most recent call last):
    File "/var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/config/application.py", line 1065, in __del__
      self.close_handlers()
      ~~~~~~~~~~~~~~~~~~~^^
    File "/var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/config/application.py", line 1054, in close_handlers
      for handler in self.log.handlers:
                     ^^^^^^^^^^^^^^^^^
  AttributeError: 'LoggerAdapter' object has no attribute 'handlers'. Did you mean: 'hasHandlers'?
  
    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))

tests/config/test_loader.py::TestKeyValueCL::test_basic
tests/config/test_loader.py::TestKeyValueCL::test_dict
tests/config/test_loader.py::TestKeyValueCL::test_dict_key_traits
tests/config/test_loader.py::TestKeyValueCL::test_eval
tests/config/test_loader.py::TestKeyValueCL::test_expanduser
tests/config/test_loader.py::TestKeyValueCL::test_extra_args
tests/config/test_loader.py::TestKeyValueCL::test_list_append
tests/config/test_loader.py::TestKeyValueCL::test_list_single_item
tests/config/test_loader.py::TestKeyValueCL::test_unicode_args
  /var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/config/loader.py:1149: DeprecationWarning: KeyValueConfigLoader is deprecated since Traitlets 5.0. Use KVArgParseConfigLoader instead.
    warnings.warn(

tests/config/test_loader.py::TestKeyValueCL::test_basic
tests/config/test_loader.py::TestArgParseKVCL::test_basic
  /var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/traitlets.py:2957: DeprecationWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hi there' instead of DeferredConfigString("'hi there'") if you require traitlets >=5.
    warn(

tests/config/test_loader.py::TestKeyValueCL::test_expanduser
tests/config/test_loader.py::TestArgParseKVCL::test_expanduser
  /var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/traitlets.py:2957: DeprecationWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use '~/' instead of DeferredConfigString('"~/"') if you require traitlets >=5.
    warn(

tests/config/test_loader.py::TestArgParseKVCL::test_expanduser2
  /var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/traitlets.py:2957: DeprecationWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use '~/1/2/3' instead of "'~/1/2/3'" if you require traitlets >=5.
    warn(

tests/test_traitlets.py::TestTraitType::test_get_undefined
tests/test_traitlets.py::TestTraitType::test_info
tests/test_traitlets.py::TestTraitType::test_set
tests/test_traitlets.py::TestTraitType::test_validate
  /var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/traitlets.py:954: DeprecationWarning: Traits should be given as instances, not types (for example, `Int()`, not `Int`). Passing types is deprecated in traitlets 4.1.
    warn(

tests/test_traitlets.py::TestTraitType::test_get_undefined
tests/test_traitlets.py::test_enum_no_default
  /var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/traitlets.py:637: DeprecationWarning: Explicit using of Undefined as the default value is deprecated in traitlets 5.0, and may cause exceptions in the future.
    warn(

tests/test_traitlets.py: 10 warnings
  /var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/traitlets.py:1629: DeprecationWarning: on_trait_change is deprecated in traitlets 4.1: use observe instead
    warn(

tests/test_traitlets.py::TestHasTraitsNotify::test_notify_only_once
  /var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/tests/test_traitlets.py:609: DeprecationWarning: B._a_changed is deprecated in traitlets 4.1: use @observe and @unobserve instead.
    def _a_changed(self, name, old, new):

tests/test_traitlets.py::test_subclass_default_value[List-default_value0]
tests/test_traitlets.py::test_subclass_default_value[Set-default_value2]
  /var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/traitlets.py:3438: DeprecationWarning: Specifying SubclassTrait(default_value=None) for no default is deprecated in traitlets 5.0.5. Use default_value=Undefined
    warn(

tests/test_traitlets.py::test_subclass_default_value[Tuple-default_value1]
  /var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/traitlets.py:3759: DeprecationWarning: Specifying SubclassTrait(default_value=None) for no default is deprecated in traitlets 5.0.5. Use default_value=Undefined
    warn(

tests/test_traitlets.py::test_hold_trait_notifications
  /var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/tests/test_traitlets.py:2331: DeprecationWarning: Test._b_validate is deprecated in traitlets 4.1: use @validate decorator instead.
    def _b_validate(self, value, trait):

tests/test_traitlets.py::test_subclass_compat
  /var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/traitlets.py:1131: DeprecationWarning: A parent of SubClass._calls_super_changed has adopted the new (traitlets 4.1) @observe(change) API
    warn(

tests/test_traitlets.py::test_unicode_from_string["xx"-xx]
tests/test_traitlets.py::test_cunicode_from_string["xx"-xx]
  /var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/traitlets.py:2957: DeprecationWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'xx' instead of '"xx"' if you require traitlets >=5.
    warn(

tests/test_traitlets.py::test_unicode_from_string['abc'-abc]
tests/test_traitlets.py::test_cunicode_from_string['abc'-abc]
  /var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/traitlets.py:2957: DeprecationWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'abc' instead of "'abc'" if you require traitlets >=5.
    warn(

tests/test_traitlets.py::test_bytes_from_string[b"xx"-xx]
tests/test_traitlets.py::test_cbytes_from_string[b"xx"-xx]
  /var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/traitlets.py:2870: DeprecationWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'xx' instead of 'b"xx"'.
    warn(

tests/test_traitlets.py::test_bytes_from_string[b'abc'-abc]
tests/test_traitlets.py::test_cbytes_from_string[b'abc'-abc]
  /var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/traitlets.py:2870: DeprecationWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'abc' instead of "b'abc'".
    warn(

tests/test_traitlets.py::test_dict_from_string[{}-expected0]
tests/test_traitlets.py::test_union_of_list_and_dict_from_string[{}-expected1-False]
  /var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/traitlets.py:4073: DeprecationWarning: --None={} for dict-traits is deprecated in traitlets 5.0. You can pass --None <key=value> ... multiple times to add items to a dict.
    warn(

tests/test_traitlets.py::test_dict_from_string[{1: 2}-expected2]
  /var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/traitlets.py:4073: DeprecationWarning: --None={1: 2} for dict-traits is deprecated in traitlets 5.0. You can pass --None <key=value> ... multiple times to add items to a dict.
    warn(

tests/test_traitlets.py::test_dict_from_string[{"key": "value"}-expected3]
  /var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/traitlets.py:4073: DeprecationWarning: --None={"key": "value"} for dict-traits is deprecated in traitlets 5.0. You can pass --None <key=value> ... multiple times to add items to a dict.
    warn(

tests/utils/test_decorators.py::TestExpandSignature::test_full_init
  /var/tmp/portage/dev-python/traitlets-5.14.3/work/traitlets-5.14.3/traitlets/traitlets.py:1385: DeprecationWarning: Passing unrecognized arguments to super(Foo).__init__(45, 'hey').
  object.__init__() takes exactly one argument (the instance to initialize)
  This is deprecated in traitlets 4.2.This error will be raised in a future release of traitlets.
    warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================= slowest 10 durations =================================================================
0.16s call     tests/config/test_application.py::test_show_config_json_cli
0.16s call     tests/config/test_application.py::test_show_config_cli
0.16s call     tests/config/test_application.py::test_help_output
0.15s call     tests/config/test_application.py::test_help_all_output
0.02s call     tests/config/test_argcomplete.py::TestArgcomplete::test_complete_subcommands
0.01s call     tests/config/test_configurable.py::TestConfigurable::test_override2
0.01s call     tests/test_traitlets.py::TestTraitType::test_deprecated_method_warnings
0.01s call     tests/test_traitlets.py::TestTraitType::test_deprecated_metadata_access
0.00s call     tests/test_traitlets.py::test_super_bad_args
0.00s call     tests/config/test_application.py::TestApplication::test_flags
=============================================================== short test summary info ================================================================
SKIPPED [1] ../../../../../../../usr/lib/python3.14/site-packages/_pytest/doctest.py:458: all tests skipped by +SKIP option
FAILED tests/config/test_argcomplete.py::TestArgcomplete::test_complete_simple_app - ValueError: badly formed help string
FAILED tests/config/test_argcomplete.py::TestArgcomplete::test_complete_custom_completers - ValueError: badly formed help string
FAILED tests/config/test_argcomplete.py::TestArgcomplete::test_complete_subcommands_subapp1 - ValueError: badly formed help string
================================================ 3 failed, 569 passed, 1 skipped, 53 warnings in 1.52s =================================================

arthurzam avatar May 31 '25 17:05 arthurzam

It's not the python version that's the problem, it's just the new argcomplete 3.6.3.

shadchin avatar Nov 04 '25 13:11 shadchin

Yes it works with argcomplete 3.6.2 but fails with 3.6.3, I think the title of the issue should reflect that.

kraj avatar Nov 18 '25 22:11 kraj