[Stackless-checkins] CVS: slpdev/src/2.3/dev/Lib copy_reg.py, 1.1.1.3, 1.2
Christian Tismer
tismer at centera.de
Thu Apr 29 04:36:23 CEST 2004
- Previous message: [Stackless-checkins] CVS: slpdev/src/2.3/dev/Python ceval.c, 1.80, 1.81
- Next message: [Stackless-checkins] CVS: slpdev/src/2.3/dev/Stackless channelobject.c, 1.42, 1.43 prickelpit.c, 1.69, 1.70 scheduling.c, 1.90, 1.91 stacklesseval.c, 1.142, 1.143 stacklessmodule.c, 1.166, 1.167 taskletobject.c, 1.108, 1.109
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/slpdev/src/2.3/dev/Lib
In directory centera.de:/tmp/cvs-serv17250/dev/Lib
Modified Files:
copy_reg.py
Log Message:
supporting stackless pickling for types which don't have __reduce__
when they allow for inheritance. Example: module
Index: copy_reg.py
===================================================================
RCS file: /home/cvs/slpdev/src/2.3/dev/Lib/copy_reg.py,v
retrieving revision 1.1.1.3
retrieving revision 1.2
diff -C2 -d -r1.1.1.3 -r1.2
*** copy_reg.py 8 Jan 2004 22:09:41 -0000 1.1.1.3
--- copy_reg.py 29 Apr 2004 02:36:21 -0000 1.2
***************
*** 68,71 ****
--- 68,78 ----
if base is self.__class__:
raise TypeError, "can't pickle %s objects" % base.__name__
+ ## Stackless addition BEGIN
+ # if base is only supported by our shadow types in copy_reg,
+ # we need to substitute here:
+ reducer = dispatch_table.get(base)
+ if reducer:
+ base = reducer(self)[0]
+ ## Stackless addition END
state = base(self)
args = (self.__class__, base, state)
_______________________________________________
Stackless-checkins mailing list
Stackless-checkins at stackless.com
http://www.stackless.com/mailman/listinfo/stackless-checkins
- Previous message: [Stackless-checkins] CVS: slpdev/src/2.3/dev/Python ceval.c, 1.80, 1.81
- Next message: [Stackless-checkins] CVS: slpdev/src/2.3/dev/Stackless channelobject.c, 1.42, 1.43 prickelpit.c, 1.69, 1.70 scheduling.c, 1.90, 1.91 stacklesseval.c, 1.142, 1.143 stacklessmodule.c, 1.166, 1.167 taskletobject.c, 1.108, 1.109
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Stackless-checkins
mailing list