Skip to content

Add control to generate __[sg]etstate__#642

Merged
hynek merged 3 commits intomasterfrom
pickle-slots-optional
May 11, 2020
Merged

Add control to generate __[sg]etstate__#642
hynek merged 3 commits intomasterfrom
pickle-slots-optional

Conversation

@hynek
Copy link
Copy Markdown
Member

@hynek hynek commented Apr 28, 2020

Pass getstate_setstate to attr.s to control the generation. Mostly interesting for disabling it in slotted classes that received autogenerated __getstate__ and __setstate__ by default until now.

Here we go @andhus – how does this look to you?

Fixes #512,#513

@hynek hynek added this to the 20.1.0 milestone Apr 28, 2020
@hynek hynek force-pushed the pickle-slots-optional branch from e0f6935 to 0788ea5 Compare April 28, 2020 10:06
@andhus
Copy link
Copy Markdown
Contributor

andhus commented Apr 28, 2020

LGTM 👍

hynek and others added 2 commits May 2, 2020 14:05
Pass *getstate_setstate* to attr.s to control the generation.  Mostly
interesting for disabling it in slotted classes.

Fixes #512,#513
@hynek hynek force-pushed the pickle-slots-optional branch from 7cb1112 to 0e13903 Compare May 2, 2020 12:05
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.

Support custom __getstate__, __setstate__ for slotted classes (or improve docs)?

2 participants