Control: tags -1 fixed-upstream patch

This was probably triggered by python-attrs 24 removing the temporary tuples from __eq__ (for efficiency):
https://sources.debian.org/src/python-attrs/24.2.0-1/CHANGELOG.md/#L46
This means that comparing an object to itself is no longer automatically True but compares the fields normally, causing an infinite recursion loop through _arg / _arg_for.

Upstream switched to dataclasses in
https://gitlab.freedesktop.org/libinput/libei/-/commit/dbc06510a115241fcfd07de49c0b991cad633721
which probably avoids this.

(Dataclasses also remove the temporary tuples from __eq__ in Python 3.13, but re-add an explicit check for object identity to deal with this case, https://github.com/python/cpython/issues/116647 .)

Alternatively, if you want a smaller (but untested) fix:

--- libei-1.3.0.orig/proto/ei-scanner
+++ libei-1.3.0/proto/ei-scanner
@@ -151,6 +151,11 @@ class Argument:
             interface=interface,
             allow_null=allow_null,
         )
+# avoid infinite _arg / _arg_for recursion (#1084247)
+inner_attribute_eq = Attribute.__eq__
+Attribute.__eq__ = lambda self, other: (self is other or
           inner_attribute_eq(self, other))
+del inner_attribute_eq


 @attr.s

(Also, unrelated to this bug: your Vcs-Git points to a repository you haven't used for several releases, which is why I'm not sending this as a merge request.)

Reply via email to