You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs(dumpkit): tree output is lossy -- decide whether to document it or fix the writer #1266
Describe the bug
The tree dumper renders '', b'', None, {}, NO_VALUE and NULL all as NIL, so they cannot be told apart; a string containing a newline breaks the layout; and a complex value raises TypeError. Nothing in the docs says the tree format is lossy. This is a question rather than a confirmed defect: tree is a display format.
To Reproduce make_dumper(dictdumper.Tree) over {'a': '', 'b': b'', 'c': None, 'd': {}, 'e': NO_VALUE, 'f': NULL} prints NIL for all six. {'a': 'x\ny'} prints |-- a -> x then y at column 0. {'c': 1+2j} raises TypeError: must be real number, not complex.
Repro: /tmp/rtissues/dumpkit-repro.py, check D12.
Expected behavior
Decide: state in the dumper docs that tree is a lossy display format, or give each of these a distinct rendering and escape newlines.
Found by the dumpkit round-trip audit (#1202). The repro was re-checked by an independent verifier, and I re-ran it on main at 11ae68ebf.
Decision needed: tree output is lossy. '', b'', None, {}, NO_VALUE and NULL all render as NIL. Newlines inside a string break the layout, and a complex value raises TypeError. Nothing in the docs says tree output is lossy.
Ruling recorded: option (1). The tree dumper is documented as a lossy, human-readable view, JSON and plist remain the lossless formats under #1202, and a complex value will be rendered rather than raising.
Blocked until#1305 merges, because the complex fix is in dumpkit/common.py, which #1305 edits.
Activity
JarryShaw commentedon Oct 7, 2026
Decision needed: tree output is lossy.
'',b'',None,{},NO_VALUEandNULLall render asNIL. Newlines inside a string break the layout, and acomplexvalue raisesTypeError. Nothing in the docs says tree output is lossy.complexfrom raising. JSON and plist stay the lossless formats under test: round-trip coverage for every protocol code, dumper and lossless path #1202.My recommendation is (1): nothing parses tree output back, so it has no round trip to keep.
JarryShaw commentedon Oct 7, 2026
take (1)
JarryShaw commentedon Oct 7, 2026
Ruling recorded: option (1). The tree dumper is documented as a lossy, human-readable view, JSON and plist remain the lossless formats under #1202, and a
complexvalue will be rendered rather than raising.Blocked until #1305 merges, because the
complexfix is indumpkit/common.py, which #1305 edits.JarryShaw commentedon Oct 7, 2026
Unblocked: #1305 merged at 20:04Z, so the option-(1) work (document the tree dumper as lossy and stop
complexfrom raising) can start. Back topending.fix(dumpkit): tree output raises on complex and is undocumented as lo…