Philipp Hörist pushed to branch master at gajim / gajim
Commits:
89272f26 by Philipp Hörist at 2025-11-29T14:45:13+01:00
fix: Commands: Don’t fail to create commands with python 3.14
- - - - -
1 changed file:
- gajim/common/commands.py
Changes:
=====================================
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]] = {}
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/89272f260c318389be10855c42ad0b82de385c77
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/89272f260c318389be10855c42ad0b82de385c77
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]