[Stackless] [Stackless-dev] Lots of changes - need more unittests

Christian Tismer tismer at stackless.com
Tue Apr 20 12:28:41 CEST 2004


Dear Stackless list,

this message is re-posted from stackless-dev, because
it has some information about ongoing activities.

As you might have noticed by stackless-checkins, I have
done a lot of changes in the dev branch. The soft-switch
protocol has changed a lot, in order to be cleaner and to
support a move towards thunks and greenlets. This was quite
a bulk of work, and there is still a lot of things to do.

The pickling has become more compatible, since I don't rename
types, any longer. Instead, they all end up in the builtins.
I'm not sure if this was the best decision, but finally, it
is somehow logical. I tried to circumvent this by involving
copy_reg, but it didn't help much.
I'm still patching the types to support pickling. I don't think
this is too bad. One bad spot is the existance of the modict.
I would like to remove it, if I can find a good alternative.

The problem is that module dicts need special treatment, and if
I don't change their type, then pickle and cPickle will treat
them like any dict, so I would have to patch cPickle and pickle.

Another news about cPickle. I added a way to overcome its recursive
behavior, by simply using hard-switching. I think this kind of
treatment is what it deserves. A better approach would be to
rewrite cPickle in a non-recursive style, but that would need
much more effort than the Stackless trick.
Fortunately, unpickling *is* non-recursive, already. I
recognized that late, after I had supplied a patch, already. :-)
Well, shit happens.

Since I have unlimited pickling, now, I could drop all the changes
to tracebacks and implement their pickling using simple recursion.
I will probably simplify tasklet pickling the same way, soon,
but this is less urgent, since tasklets are my own type.

I was very happy to see a new unittest from Stefan Drees, and
I'd really appreciate to see some more, very soon.

There is also some lack in testing the Stackless API, which
is meant to be used by extension writers. A special area
is the case where Stackless internals are called without
initializing Stackless. This should always work, but I need
some decent tests for this, and this is only possible by
an extension module. Maybe someone would like to give this
a try?

cheers -- chris

-- 
Christian Tismer             :^)   <mailto:tismer at stackless.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  mobile +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/



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


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



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



More information about the Stackless mailing list