Philipp Hörist pushed to branch master at gajim / python-nbxmpp


Commits:
6f8890d7 by lovetox at 2021-10-25T23:54:24+02:00
Don’t use dataclasses.asdict()

asdict() recurses into other objects, we don’t want this here

- - - - -


1 changed file:

- nbxmpp/structs.py


Changes:

=====================================
nbxmpp/structs.py
=====================================
@@ -197,7 +197,11 @@ class RosterItem:
                    groups=groups)
 
     def asdict(self):
-        return dataclasses.asdict(self)
+        return {'jid': self.jid,
+                'name': self.name,
+                'ask': self.ask,
+                'subscription': self.subscription,
+                'groups': self.groups}
 
 
 class DiscoInfo(namedtuple('DiscoInfo', 'stanza identities features dataforms 
timestamp')):



View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/6f8890d74968119c12969dd82ee5cf399d62583f

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/6f8890d74968119c12969dd82ee5cf399d62583f
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
Commits@gajim.org
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to