https://dev.gajim.org/gajim/gajim/-/commit/89272f260c318389be10855c42ad0b82de385c77 From 89272f260c318389be10855c42ad0b82de385c77 Mon Sep 17 00:00:00 2001 From: Philipp Hörist Date: Sat, 29 Nov 2025 14:45:13 +0100 Subject: [PATCH] fix: Commands: Don’t fail to create commands with python 3.14 --- a/gajim/common/commands.py +++ b/gajim/common/commands.py @@ -9,6 +9,7 @@ import io import operator import shlex +import sys from collections.abc import Callable from nbxmpp.protocol import JID @@ -77,7 +78,12 @@ def __init__(self) -> None: Observable.__init__(self) def init(self) -> None: - self._parser = ArgumentParser(prog='ChatCommands') + if sys.version_info >= (3, 14): + # Disable colors because we depend on a stable format for the + # usage string + self._parser = ArgumentParser(prog='ChatCommands', color=False) + else: + self._parser = ArgumentParser(prog='ChatCommands') self._sub_parser = self._parser.add_subparsers(title='Commands') self._commands: dict[str, tuple[list[str], str]] = {} -- GitLab