]> 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:57:26 +0000 (17:57 +0000)
committerMichael W. Hudson <mwh@python.net>
Sat, 16 Mar 2002 17:57:26 +0000 (17:57 +0000)
commitbf05f2aaa6ae80a9305f4e70691e53c380c0c459
tree7492f478303259cf8392ae3ac30f9a3e0e89be4e
parent18d81afd2364a4f21ad4d5a63eb7604ff019229f
backport gvanrossum's checkin of
    revision 1.121 of test_descr.py

"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