]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
backport gvanrossum's checkin of
authorMichael W. Hudson <mwh@python.net>
Sat, 16 Mar 2002 17:56:51 +0000 (17:56 +0000)
committerMichael W. Hudson <mwh@python.net>
Sat, 16 Mar 2002 17:56:51 +0000 (17:56 +0000)
commit18d81afd2364a4f21ad4d5a63eb7604ff019229f
treeb0d68ac6745b7edd58811a6ad5619a85262145e1
parent3df46a80289790a3fbb26b7eafa7070373a8539e
backport gvanrossum's checkin of
    revision 2.129 of typeobject.c

"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.
Objects/typeobject.c