Skip to content

Conversation

@PCManticore
Copy link
Contributor

@PCManticore PCManticore commented Nov 19, 2019

Frozen dataclasses, in conjunction with with slots, cannot be unpickled, as we were using __setattr__ to set the new instance's attribute which conflicts with the slots definition.
Adding __getstate__ and __setstate__ for these classes should alleviate the issue, as we can use object.__setattr__ instead to set the frozen attributes on instance's state assignment.

https://bugs.python.org/issue36424

Frozen dataclasses, in conjunction with with __slots__, cannot be
unpickled, as we were using `__setattr__` to set the new instance's
attribute which conflicts with the __slots__ definition.
Adding `__getstate__` and `__setstate__` for these classes should
alleviate the issue, as we can use `object.__setattr__` instead to
set the frozen attributes on instance's state assignment.
@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

Recognized GitHub username

We couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames:

@PCManticore

This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

@PCManticore
Copy link
Contributor Author

Let me know if there is anything I can do to help with the review of this patch.

cmaclell pushed a commit to apprenticelearner/AL_Core that referenced this pull request Mar 6, 2020
@seandstewart
Copy link

What is the status of this request? Would be a good thing to see patched.

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.

4 participants