◐ Shell
clean mode source ↗

bpo-36424: Add support for pickling frozen dataclasses with __slots__ by ZackerySpytz · Pull Request #22459 · python/cpython

Skip to content

Navigation Menu

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

Allow to pickle and unpickle frozen dataclasses that have
__slots__.

Co-Authored-By: Claudiu Popa <pcmanticore@gmail.com>

@ZackerySpytz

Some of the added code does not adhere to PEP 8 w.r.t. line length -- that is for symmetry with the adjacent _create_fn() calls (which themselves don't follow PEP 8).

MojoVampire

@Kobzol

What's the status of this PR? We want to send frozen dataclasses to multiple processes in Keras multi-GPU training and the inability to (un)pickle them severely limits this use case.

@akulakov

@Kobzol this was fixed (see issue) but hasn't been backported to 3.9; so one option is to wait for 3.10 release.

@drhagen drhagen mannequin mentioned this pull request

Apr 10, 2022

@hauntsaninja

Thanks, this was fixed in #25786

Labels