| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Also fix a crash when unmarshalling a self-referencing tuple. Co-Authored-By: Michael Bommarito <michael.bommarito@gmail.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Also fix a crash when unmarshalling a self-referencing tuple. Co-authored-by: Michael Bommarito <michael.bommarito@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
Unmarshalling data which encodes a self-referencing tuple crashed the interpreter if the reference was hashed while the tuple was still incomplete (e.g. ({<R>: None},)). The tuple is now registered for back-references only after all its items are read, like for frozensets, so such data is rejected with ValueError: bad marshal data (invalid reference).
Marshalling a recursive tuple now raises ValueError, like for recursive code objects, slices and frozendicts (#148698). As a consequence, data which encodes a recursive tuple can no longer be loaded.
Marshalled output is unchanged: dumping 156 stdlib modules at versions 5 and 6 gives identical bytes, and load and dump timings are unchanged.