On Python 3.15.0, every tmuxp invocation, including tmuxp --version, fails with AttributeError: 'NoneType' object has no attribute 'reset' while the argument parser is being built. TmuxpHelpFormatter declares a class attribute _theme that shadows the _theme property of argparse.HelpFormatter, which 3.15 added to support coloured help. Much of the test suite fails for the same reason; it passes on Python 3.14.
Step 2: Provide tmuxp details
tmuxp debug-info crashes on 3.15 with the same error, so these versions come from the checkout and uv.lock:
Environment
tmuxp 1.74.0 at ddd6cce, libtmux 0.61.0 (from uv.lock)
Python 3.15.0
uv 0.13.1
Linux x86_64
Step 3: Describe the problem:
Steps to reproduce:
Check out the repository and install the project with all extras and dev dependencies on Python 3.15.
$ uv sync --python 3.15 --all-extras --dev
Run any command.
$ uv run tmuxp --version
Or run a single test.
$ uv run py.test tests/cli/test_cli.py -k help_long_flag
Observed Results:
AttributeError: 'NoneType' object has no attribute 'reset'
Without colour (no TTY, or NO_COLOR set), create_themed_formatter() binds theme = None, so argparse reads None for self._theme in _apply_text_markup. With colour forced (FORCE_COLOR=1), the bound HelpTheme is read instead and fails with AttributeError: 'HelpTheme' object has no attribute 'prog_extra', because argparse expects its own theme object.
Traceback from uv run tmuxp --version
Traceback (most recent call last):
File "<repo>/.venv/bin/tmuxp", line 10, in <module>
sys.exit(cli.cli())
~~~~~~~^^
File "<repo>/src/tmuxp/cli/__init__.py", line 297, in cli
parser = create_parser()
File "<repo>/src/tmuxp/cli/__init__.py", line 169, in create_parser
parser = argparse.ArgumentParser(
prog="tmuxp",
description=CLI_DESCRIPTION,
formatter_class=formatter_class,
)
File "<stdlib>/argparse.py", line 2058, in __init__
self.add_argument(
File "<stdlib>/argparse.py", line 1695, in add_argument
self._check_help(action)
File "<stdlib>/argparse.py", line 1887, in _check_help
formatter._expand_help(action)
File "<stdlib>/argparse.py", line 716, in _expand_help
return self._apply_text_markup(help_string)
File "<stdlib>/argparse.py", line 568, in _apply_text_markup
if not t.reset:
^^^^^^^
AttributeError: 'NoneType' object has no attribute 'reset'
Expected Results:
tmuxp --version prints the version, and the test suite passes as it does on Python 3.14.
tmuxp's formatter already used _theme for its own HelpTheme, so it now collides with the stdlib name: the class attribute at src/tmuxp/cli/_formatter.py lines 85-86 replaces the property, and the instance assignment in lines 391-396 sets the value argparse then reads. The parser is built at src/tmuxp/cli/__init__.py lines 163-173, and ArgumentParser.__init__ adds -h/--help, whose help text goes through _apply_text_markup immediately.
Proposal
Store tmuxp's theme under a name argparse does not use, for example _help_theme, in TmuxpHelpFormatter._fill_text, _colorize_example_line, and create_themed_formatter, and leave _theme to the standard library.
Activity
cli(fix[formatter]): Leave _theme to argparse
cli(fix[formatter]): Leave _theme to argparse
cli(fix[formatter]): Leave _theme to argparse