#1142058 cinnamon-common: CinnamonGtkSettings.py SyntaxWarning in rtupdate hook on update to python3.14

Package:
cinnamon-common
Source:
cinnamon-common
Submitter:
Tomáš Szaniszlo
Date:
2026-09-19 16:39:01 UTC
Severity:
normal
Tags:
#1142058#5
Date:
2026-07-14 16:58:25 UTC
From:
To:
Dear maintainer,

on a packages update from Python 3.13 to 3.14 I got this warning:

    Setting up python3 (3.14.6-1)…
    running python rtupdate hooks for python3.14...
    /usr/share/cinnamon/cinnamon-settings/bin/CinnamonGtkSettings.py:44: SyntaxWarning: 'return' in a 'finally' block
      return keyfile
    running python post-rtupdate hooks for python3.14...

Just to note, I do not recall seeing this warning on previous updates.

Best wishes
Tomaxuser

#1142058#12
Date:
2026-09-19 16:37:29 UTC
From:
To:
Hi Tomáš,

thanks for the report. You are right that this is new: the 'return' in a
'finally' block has always been there, but Python 3.14 started warning
about it
(PEP 765).

The warning is harmless here. The bare "except:" already swallows every
exception and there is no return, break or continue in the try block, so the
return in the finally block cannot hide anything. It is only noise in
the apt
output.

It is already fixed upstream [1], and I checked that this is the only such
warning in the whole package: compiling all 74 Python files of 6.6.9 with
python3 3.14.7 produces no other one. Since the fix is purely cosmetic,
we will
pick it up with the next upstream release (6.8) rather than carrying a
patch,
and this bug will be closed then.

Thanks,

[1]
https://github.com/linuxmint/cinnamon/commit/127fe2d5ceb411f981257ab47d9ee5e13007c052