| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
… mutation (pythongh-142851) User callbacks invoked during JSON encoding (e.g. the `default` callback or a custom string encoder) can mutate or clear the dict or sequence being encoded, invalidating borrowed references to items, keys, and values. Hold strong references unconditionally while iterating. Co-authored-by: Kumar Aditya <kumaraditya@python.org> Co-authored-by: Gregory P. Smith <greg@krypto.org> (cherry picked from commit 235fa72)
Documentation build overview454 files changed · ± 416 modified · - 38 deleted ± Modified
- Deleted |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Manual backport of #142851 to 3.13 (the bot couldn't cleanly cherry-pick due to refactors in main).
The fix had to be adapted because:
Only the two UAF regression tests from the original PR were included — test_current_indent_level from the surrounding context is unrelated to this fix and would require additional 3.14-only changes.
Built --with-pydebug and ran ./python -m test test_json -v locally — all 197 tests pass.