[Stackless-checkins] CVS: slpdev/src/2.3/dev/Stackless/unittests test_miscell.py, 1.3, 1.4

Christian Tismer tismer at centera.de
Fri Apr 23 02:34:40 CEST 2004


Update of /home/cvs/slpdev/src/2.3/dev/Stackless/unittests
In directory centera.de:/tmp/cvs-serv4949/dev/Stackless/unittests

Modified Files:
	test_miscell.py 
Log Message:
I did a complete rewrite of Stackless pickling.
There is *no longer* any patched type.
All post-pickled builtin types are now installed into copy_reg.
This is done through a module _wrap in stackless.
The implementation use sshadow type objects which act like the real
types, but they have __reduce__, __new__, __setstate__.
This works just great now.
One missing spot is pickleing of

def f():yield 42

pickle.dumps(type(f()).next)

This needs a slot wrapper which is missing.

Besides that, I have thought out a second rewrite of pickling which uses
a simple special object, which is much smaller and can serve the
same service. This will generalize pickling even much more and will
make it easier to adopt to all those many new types in Zope, for instance.
Stay tuned!

Index: test_miscell.py
===================================================================
RCS file: /home/cvs/slpdev/src/2.3/dev/Stackless/unittests/test_miscell.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** test_miscell.py	18 Apr 2004 15:14:37 -0000	1.3
--- test_miscell.py	23 Apr 2004 00:34:38 -0000	1.4
***************
*** 7,11 ****
  def runtask():
      x = 0
!     # provoke pickling of an xrange object
      dummy = xrange(10)
      for ii in xrange(1000):
--- 7,11 ----
  def runtask():
      x = 0
!     # evoke pickling of an xrange object
      dummy = xrange(10)
      for ii in xrange(1000):


_______________________________________________
Stackless-checkins mailing list
Stackless-checkins at stackless.com
http://www.stackless.com/mailman/listinfo/stackless-checkins



More information about the Stackless-checkins mailing list