]> granicus.if.org Git - python/commit
"Fix" for SF bug #520644: __slots__ are not pickled.
authorGuido van Rossum <guido@python.org>
Thu, 14 Mar 2002 23:05:54 +0000 (23:05 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 14 Mar 2002 23:05:54 +0000 (23:05 +0000)
commit8c8425531638fcab2093639d29c413cdb3bea787
tree2506d03952de8ec487ffd333d4d3f80cc119d177
parent0628dcfe1faac4926505f8c4cb1905d7700d1bf1
"Fix" for SF bug #520644: __slots__ are not pickled.

As promised in my response to the bug report, I'm not really fixing
it; in fact, one could argule over what the proper fix should do.
Instead, I'm adding a little magic that raises TypeError if you try to
pickle an instance of a class that has __slots__ but doesn't define or
override __getstate__.  This is done by adding a bozo __getstate__
that always raises TypeError.

Bugfix candidate (also the checkin to typeobject.c, of course).
Lib/test/test_descr.py
Misc/NEWS