Logging fails with dictionary keys that are bytes
On Python 2, JSON would happily encode byte strings, so long as they were ASCII at least. In Python, the json module knows nothing about bytes.
In Tahoe-LAFS, there is now custom code to deal with this, e.g. https://github.com/tahoe-lafs/tahoe-lafs/blob/master/src/allmydata/util/jsonbytes.py#L31 and later parts of that module.
Foolscap is still lacking this infrastructure. As such, when a log message comes in where keys are bytes, it fails, e.g.:
2021-05-10T10:40:57-0400 [stdout#info] GATHERER: unable to serialize {'facility': 'tahoe.storage_broker', 'format': '%(name)s provided version info %(version)s', 'incarnation': ('86433dff70db2783', None), 'level': 10, 'name': b'q26hhekw', 'num': 626, 'parent': 617, 'time': 1620657650.2063904, 'umid': 'SWmJYg', 'version': {b'application-version': b'tahoe-lafs/1.14.0.post3323', b'http://allmydata.org/tahoe/protocols/storage/v1': {b'available-space': 7235896832, b'delete-mutable-shares-with-zero-length-writev': True, b'fills-holes-with-zero-bytes': True, b'maximum-immutable-share-size': 7235896832, b'maximum-mutable-share-size': 69105000000000000, b'prevents-read-past-end-of-share-data': True, b'tolerates-immutable-read-overrun': True}}}: keys must be a string}