Added copy-pastable verification instructions.
** Description changed:
[ Impact ]
Starting the powerline-daemon fails due to nested argument groups being
deprecated since Python 3.11 and now removed in Python 3.14. Affected
arguments are: '-f,--foreground', '-r,--replace', and '-k,--kill'
The upload fixes that bug by adding all arguments to the top level. The
change was cherry-picked from the upstream's development branch, which,
however, is currently not actively developed anymore, and therefore, a
new release is not to be expected anytime soon.
[ Test Plan ]
To reproduce the bug, run
$ powerline-daemon
Traceback (most recent call last):
File "/usr/bin/powerline-daemon", line 495, in <module>
main()
~~~~^^
File "/usr/bin/powerline-daemon", line 423, in main
parser = get_daemon_argparser()
File "/usr/lib/python3/dist-packages/powerline/commands/daemon.py", line
21, in get_argparser
replace_group = exclusive_group.add_argument_group()
File "/usr/lib/python3.14/argparse.py", line 1806, in add_argument_group
raise ValueError('argument groups cannot be nested')
ValueError: argument groups cannot be nested
After installing the fixed package, the following commands should work:
* "powerline-daemon" should exit with 0 and start a new daemon in background
* "powerline-daemon --replace" should exit with 0 and replace the existing
daemon
* "powerline-daemon --kill" should exit with 0 and kill the existing daemon
* "powerline-daemon --foreground" should start a new, previously
non-existing daemon
+
+ Run the following script (with powerline-daemon NOT running) to verify
+ that the fix is working correctly:
+
+ ```
+ #!/bin/bash
+ set -eu
+ powerline-daemon
+ powerline-daemon --replace
+ powerline-daemon --kill
+ powerline-daemon --foreground &
+ sleep 3s
+ # check for proper error return codes
+ powerline-daemon || [ $? = 1 ]
+ powerline-daemon --foreground || [ $? = 1 ]
+ powerline-daemon --kill
+ powerline-daemon --kill || [ $? = 1 ]
+ powerline-daemon --replace || [ $? = 1 ]
+ powerline-daemon --kill
+ echo SUCCESS
+ ```
[ Where problems could occur ]
The upload changes the argument handling in accordance with the Python
3.14 argparse specification. The regression risk is rather low, as only
three specific arguments are affected by the change, and all of them are
covered by the test plan.
[ Other Info ]
Upstream addresses this issue in a larger squashed commit on their
development branch:
https://github.com/powerline/powerline/commit/11808cbe5c16e4621edcaefa916b5add81eab799
However, the original commit that specifically addresses this issue
alone can be found in the pull request:
https://github.com/powerline/powerline/pull/2271/changes/9739ec502075d8053108f8ee83928f92ac64a642
---
Original bug description by @jpmorelli:
Boot after updating and installing standard packages from official
repositories.
ProblemType: Crash
DistroRelease: Ubuntu 26.04
Package: powerline 2.8.4-1
ProcVersionSignature: Ubuntu 7.0.0-14.14-generic 7.0.0
Uname: Linux 7.0.0-14-generic x86_64
ApportVersion: 2.34.0-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: unknown
Date: Tue Apr 21 12:21:18 2026
ExecutablePath: /usr/bin/powerline-daemon
InstallationDate: Installed on 2026-04-21 (0 days ago)
InstallationMedia: Ubuntu 26.04 "Resolute Raccoon" - Daily amd64 (20260325)
InterpreterPath: /usr/bin/python3.14
ProcCmdline: /usr/bin/python3 /usr/bin/powerline-daemon --foreground
ProcEnviron:
LANG=en_US.UTF-8
PATH=(custom, no user)
SHELL=/bin/bash
XDG_RUNTIME_DIR=<set>
Python3Details: /usr/bin/python3.14, Python 3.14.4, python3-minimal,
3.14.3-0ubuntu2
PythonArgs: ['/usr/bin/powerline-daemon', '--foreground']
PythonDetails: N/A
SourcePackage: powerline
Title: powerline-daemon crashed with ValueError in add_argument_group():
argument groups cannot be nested
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm audio cdrom dip lpadmin plugdev sudo users
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2149815
Title:
powerline-daemon crashed with ValueError in add_argument_group():
argument groups cannot be nested
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/powerline/+bug/2149815/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs