Root cause found, and it is not the same as the Anaconda issue in
https://gitlab.gnome.org/GNOME/pygobject/-/work_items/764 -
cinnamon-screensaver exports its D-Bus interface through the C skeleton
generated by gdbus-codegen, so it never goes through the Python
register_object() override.

What breaks it is that GLib.Pid is no longer an int. Up to 3.56.3 it was
gi._gi.Pid, a C type deriving from int; since 3.57.0 (upstream commit
b6e14902, "Reimplement GLib.spawn_async in Python") it is:

    class Pid:
        def __init__(self, pid): self._pid = pid
        def __int__(self): return self._pid
        def close(self): GLib.spawn_close_pid(self._pid)

No __index__, no rich comparisons. So for any application that keeps the
result of GLib.spawn_async() around, `pid > 0` now raises TypeError and
os.kill(pid, sig) no longer works. In cinnamon-screensaver this aborts the
unlock path and leaves the screen locked (details in #1143872).

I have patches for cinnamon-screensaver ready and also posted upstream,
so this should not hold pygobject back for long. But I would suggest raising
it with pygobject upstream as well: it is a silent API break with no NEWS
entry and no porting note, the class is unchanged in git main, and any other
Python application using GLib.spawn_async() is exposed to it. Adding
__index__ and the integer comparisons back (or simply deriving from int
again) would keep the old code working.

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to