- Package:
- galternatives
- Source:
- galternatives
- Submitter:
- Thomas Ward
- Date:
- 2026-06-28 17:39:05 UTC
- Severity:
- normal
- Tags:
Note that in Unstable, we use Python 3.13. However, if you install
Python 3.14 and use that as your system defaults (NOT advised), you will
replicate this error.
This issue was originally discovered because downstream in Ubuntu for
Ubuntu 26.04 development cycle, we use Python 3.14 down there. Thus
showing the Python 3.14 issues here.
---
When trying to run `galternatives` in a Python 3.14 environment, we are
met with the following crash and failure to execute the software:
Traceback (most recent call last):
File "/usr/bin/galternatives", line 6, in <module>
runpy.run_module('galternatives', run_name='__main__')
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen runpy>", line 229, in run_module
File "<frozen runpy>", line 88, in _run_code
File "/usr/lib/python3/dist-packages/galternatives/__main__.py", line
12, in <module>
from galternatives.app import GAlternativesApp
File "/usr/lib/python3/dist-packages/galternatives/app.py", line 19,
in <module>
from .alternative import AltDB, AltGroup, AltOption, CommandResult
File "/usr/lib/python3/dist-packages/galternatives/alternative.py",
line 55, in <module>
class AltOption(dict[str, str]):
...<71 lines>...
for i in range(len(group)))
File "/usr/lib/python3/dist-packages/galternatives/alternative.py",
line 65, in AltOption
__slots__ = tuple(__annotations__)
^^^^^^^^^^^^^^^
NameError: name '__annotations__' is not defined
---
Upon examination of Python Best Practices [1], it is suggested that
`annotationlib.get_annotations()` be used wherever a direct
`__annotations__` reference is made.
However, this cannot be done bare, it has to refer to the object itself.
Additionally, __annotations__ isn't defined by default for classes
anymore, and thus attempting to set `__slots__` before instantiation
with `__init__` does not work.
Downstream, and after an hour of poking, changes to set `__slots__`
during initialization made it capable to fix this issue.
A patch via Merge Request has been made available on Salsa, without
d/changelog entries. [2]
Thomas
[1]: https://docs.python.org/3/howto/annotations.html
[2]: https://salsa.debian.org/chinese-team/galternatives/-/merge_requests/1
We believe that the bug you reported is fixed in the latest version of
galternatives, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1134570@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Boyuan Yang <byang@debian.org> (supplier of updated galternatives package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 28 Jun 2026 13:08:23 -0400
Source: galternatives
Architecture: source
Version: 1.0.11
Distribution: unstable
Urgency: medium
Maintainer: Debian Chinese Team <chinese-developers@lists.alioth.debian.org>
Changed-By: Boyuan Yang <byang@debian.org>
Closes: 1134570
Changes:
galternatives (1.0.11) unstable; urgency=medium
.
* New upstream release. (Closes: #1134570)
* debian/: Bump debhelper compat to v14, Standards-Version 4.7.4.
* debian/lintian-overrides: Rename to galternatives.lintian-overrides.
* debian/manpages: Rename to galternatives.manpages.
* debian/copyright: Update to use SPDX short names.
* Merge select changes from Ubuntu:
.
[ Thomas Ward ]
* d/rules: Add PEP440_VERSION definition that alters the VERSION
string to provide a PEP440 compliant string that works with
pybuild and setuptools. Fixes FTBFS from build1 and the
introduction of ubuntu1 in the version string for PEP440
compliance.
Checksums-Sha1:
bdbd96a34fd238029a68c8fb6aaaca31ac36ee84 1754 galternatives_1.0.11.dsc
f3b3a2c656b9352f1b03ddeec3d57527c476e764 73384 galternatives_1.0.11.tar.xz
69ba1277b3e41eb5bd77e614a791343e2aa368d4 11391 galternatives_1.0.11_amd64.buildinfo
Checksums-Sha256:
14ec4e0dfb1c68cf865f765f3261085d83cde88c91e42ce78a738e96ec3054dc 1754 galternatives_1.0.11.dsc
48f7750e93fe9836c19c5fdfd13d6b2a7ff2de2a1815ca138ee5a01fbfe8b675 73384 galternatives_1.0.11.tar.xz
0c42f80d42abba6c8ada8630f0baf9a1db44d1f028faf1e271b96866479a8781 11391 galternatives_1.0.11_amd64.buildinfo
Files:
325a22ee2b1e921de5fb6c8099d38af0 1754 admin optional galternatives_1.0.11.dsc
0b717207b58b830b52a52647937bd1b7 73384 admin optional galternatives_1.0.11.tar.xz
e72794b9409e9a163e60fccd2dfb2c6e 11391 admin optional galternatives_1.0.11_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEfncpR22H1vEdkazLwpPntGGCWs4FAmpBVcEACgkQwpPntGGC
Ws7I/hAArp0r/HtSJrwmsBzEp6xiD0JjsRgsG2d4umQCXfV7vBV4dUTIrqj9U3/h
r0j2Qlsg2ley4Lc6Yoe0hHbMzAfsT9Pl41WpEhwHZlRr1QJYnC8sKoBadpQFYhcx
2IQRj7Xtli2spCdsNMrjZIndu205gx1xLaQm/0Rj53eRcek5u5YovhnAeih3wXJz
YaDVFlIu2WrHi85//W95rwnRTA4gUUZoeHpP9bWaqlRzqI/l/HWitTgt4IVxx5IX
eAMOK26/u0BK7+pQAX64n1U1SIOh6vBEV5dp23bE63u/DMt/8sc1JzhIpgTM4GbP
fdI4DF6MIIe0zQSuLAAB5IsUT+FUnIK23ObiOpLAB+RjdPfnNdn8CvVny9q6jzXn
Bj5tiRXLvWXye6NyKKI9LxJQ6JpKfJKxDgSx5xNdR7RSbcp+iod4fgVPVgC/zPyx
R8ziDdi8i7jgUt6fhjdG35YJZRM9qE+PN9kErWzkhdGQBed4Stc7CJEWJLxhM5Yh
KjnL23V9mbIOeTODHWOQywaUgud3JrZKNYH2JfCFs0qmv2cNuMg5PUlJF/p1wi79
etTA+NPeBSLrp7idl0F62z/7+fulffJwkdjoWGzcZx/R/SENYR9oliQ1LSl1+u5p
pMcv8Ddc7NpYWa5PPgWvWjFppOw4Fl2UhDWe7IUe+n3zSCezMnU=
=PY/Y
-----END PGP SIGNATURE-----