This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pierreglaser
Recipients alexandre.vassalotti, docs@python, pierreglaser, pitrou, rhettinger, serhiy.storchaka
Date 2019-02-20.15:41:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I added a PR with a small patch to document this behavior and reconcile _pickle.c and

Some explanations on why I am pushing this forward:
Pickling instances of classes/subclasses with slots is done natively for pickle protocol >= 2. Mentioning this behavior in the docs should *not* make the user worry about implementing custom __getstate__ methods just to preserve slots.

Here is the reason why I think this functionality (allowing state and slotstate) is worth documenting: pickle gives us a lot of flexibility for reducing thanks to the dispatch_table. But unpickling is rather rigid: if no __setstate__ exists, we have to deal with the default state updating procedure present in load_build. Might as well document all of it ;)
Date User Action Args
2019-02-20 15:41:42pierreglasersetrecipients: + pierreglaser, rhettinger, pitrou, alexandre.vassalotti, docs@python, serhiy.storchaka
2019-02-20 15:41:42pierreglasersetmessageid: <>
2019-02-20 15:41:42pierreglaserlinkissue35933 messages
2019-02-20 15:41:42pierreglasercreate