New submission from Brad Bishop <bradl...@fuzziesquirrel.com>:
JSON does not correctly encode dbus.Byte from dbus-python on 2.7: dbus.Byte is a subclass of int with its own __str__ implementation. >>> import json >>> import dbus >>> json.dumps(dbus.Byte(0)) '\x00' On 3.x: >>> import json >>> import dbus >>> json.dumps(dbus.Byte(0)) '0' This seems to have been fixed in 3.x here: https://bugs.python.org/issue18264 and subsequently: https://bugs.python.org/issue26719 I'm interested in backporting these but they are marked as enhancements. However a backport for a similar issue: https://bugs.python.org/issue27934 was accepted. Would the maintainers be amenable to a backport of 18264 & 26719? ---------- components: Library (Lib) messages: 318954 nosy: radsquirrel priority: normal severity: normal status: open title: json int encoding incorrect for dbus.Byte type: behavior versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33797> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com