[WIP] gh-141510: PEP 814: Add built-in frozendict type#141508
[WIP] gh-141510: PEP 814: Add built-in frozendict type#141508vstinner wants to merge 25 commits intopython:mainfrom
Conversation
* Basic tests * Bare minimum documentation * Support frozendict in marshal, pickle, json * Replace dict with frozendict in many stdlib modules Co-Authored-by: Donghee Na <donghee.na@python.org> Co-Authored-by: Marco Sulla <github@marco.sulla.e4ward.com>
|
This PR was created mainly to play with PEP 814 implementation, not to be merged. If PEP 814 is accepted, this PR should be splitted into smaller parts, easier to review. |
mypy fails with |
|
Tests / Android (x86_64) (pull_request) does crash, I'm not sure why. |
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
It should be fixed by Add PyFrozenDict_Type to static_types commit. |
Co-authored-by: kalvdans <github@kalvdans.no-ip.org>
|
TODO: Provide better error on hashing a mutable value: |
Add GET_USED() macro.
|
This PR is a draft combining all changes to adopt frozendict in the stdlib. It's too big to be merged. I started to split this PR into smaller PRs with #144757 as a starting point: most basic PR just to add the frozendict type. |
📚 Documentation preview 📚: https://cpython-previews--141508.org.readthedocs.build/