Skip to content

gh-155324: Pickle frozendict with all protocols - #155325

Open
tonghuaroot wants to merge 1 commit into
python:mainfrom
tonghuaroot:frozendict-pickle-parity
Open

gh-155324: Pickle frozendict with all protocols#155325
tonghuaroot wants to merge 1 commit into
python:mainfrom
tonghuaroot:frozendict-pickle-parity

Conversation

@tonghuaroot

@tonghuaroot tonghuaroot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

frozendict only defined __getnewargs__, so pickling raised TypeError at
protocols 0 and 1 (which do not use it); protocols 2 to 5 worked. Give
frozendict a __reduce__ mirroring frozenset, so it pickles at every
protocol, including a subclass's instance state.

frozendict only defined __getnewargs__, so pickling raised TypeError at
protocols 0 and 1. Give it a __reduce__ mirroring frozenset.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant