Fix marshal recursive reference loading (#8501) · RustPython/RustPython@d64cc2c · GitHub
Skip to content

Commit d64cc2c

Browse files
authored
Fix marshal recursive reference loading (#8501)
* Fix marshal recursive reference loading Create reference-tracked containers before reading their children so recursive list, dict, set, and tuple graphs can be unmarshaled. Preserve interned string markers through the runtime bag and add an initialization-only tuple construction path. Assisted-by: Codex:gpt-5 * Preserve marshal container insertion errors Keep Python exceptions raised while constructing unmarshaled sets, frozensets, and dictionaries instead of collapsing them into ValueError. This makes abnormal recursive hash-container streams report TypeError like CPython and removes the remaining test_marshal expected failure. Assisted-by: Codex:gpt-5 * Enable full abnormal marshal reference loop test * Test direct marshal tuple reference loop Assisted-by: Codex:gpt-5
1 parent 9de06cc commit d64cc2c

4 files changed

Lines changed: 366 additions & 89 deletions

File tree

Lib/test/test_marshal.py

Lines changed: 7 additions & 14 deletions

crates/compiler-core/src/marshal.rs

Lines changed: 144 additions & 24 deletions

0 commit comments

Comments
 (0)