Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pickling of frozenlist #2890

Merged
merged 6 commits into from
Sep 11, 2020

Conversation

kinghuang
Copy link
Contributor

Implement __reduce__ and __setstate__ on frozenlist so that it can be unpickled. Otherwise, __setitem__ will be called to restore the frozenlist, causing a RuntimeError because frozenlist is not mutable.

Also add a couple of simple tests for pickling frozenlist and frozendict.

Fixes #2719.

@alangenfeld
Copy link
Member

Awesome, this looks great. Thanks once again! Will merge once buildkite comes back green

Like frozendict, implement __reduce__ and __setstate__ to handle
pickling. Otherwise, __setstate__ will be called to restore the
frozenlist, causing a RuntimeError because frozenlist is not mutable.

Closes dagster-io#2719
@kinghuang kinghuang force-pushed the 2719-frozenlist-unpickle branch from 6d1980f to 742862f Compare September 10, 2020 21:00
@alangenfeld alangenfeld merged commit 7758e72 into dagster-io:master Sep 11, 2020
@kinghuang kinghuang deleted the 2719-frozenlist-unpickle branch September 11, 2020 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dagster.utils.frozenlist cannot be unpickled
2 participants