[Python-bugs-list] [ python-Bugs-651701 ] Bozo getstate w/ slots overrides base

SourceForge.net noreply@sourceforge.net
Fri, 11 Jul 2003 18:36:13 -0700


Bugs item #651701, was opened at 2002-12-10 18:10
Message generated for change (Comment added) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=651701&group_id=5470

Category: Type/class unification
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Peter Fein (pafein)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bozo getstate w/ slots overrides base

Initial Comment:
The bozo __getstate__ set automatically on classes
defining __slots__ overrides any __getstate__ defined
in a base class.  This makes writing a mixin to
implement this method impossible.

----------------------------------------------------------------------

>Comment By: Raymond Hettinger (rhettinger)
Date: 2003-07-11 20:36

Message:
Logged In: YES 
user_id=80475

Peter, is this still an issue?
Can you attach a script demonstrating the problem?

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2003-05-22 17:15

Message:
Logged In: YES 
user_id=33168

There was an issue with that, IIRC.  There was a discussion
on python-dev a while ago which Guido talked about the
issues.  I don't remember when or what the issues were. 
Probably about 3-6 months ago.  I think the code in this
area may have changed, so it would be beneficial to test
with 2.3b1.

----------------------------------------------------------------------

Comment By: Peter Fein (pafein)
Date: 2003-05-22 17:09

Message:
Logged In: YES 
user_id=639329

This issue is that although the base class B defines a
__getstate__, the class C2 overrides it b/c it contains 
__slots__.  Basically, I'm suggesting that base classes
should be checked for getstate instead of only looking at
the class that defines slots before adding the bozo'd version.

Unfortunately, I don't have a 2.3* version to play with at
the moment.  Please let me know if this clarifies things.

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2003-05-22 16:58

Message:
Logged In: YES 
user_id=33168

What do you expect to be printed?  I'm not sure what you
want changed.  Have you tested with 2.3b1?  Does this meet
your needs?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=651701&group_id=5470