@@ -100,3 +100,37 @@ different address than *t1*, which was displayed earlier.
100
100
this is true, is where not all the functions called by the code within
101
101
the tasklet are |PY | functions. The Stackless pickling mechanism
102
102
has no ability to deal with C functions that may have been called.
103
+
104
+ .. note ::
105
+
106
+ It is not possible to unpickle running tasklets which were pickled by a
107
+ different minor version of |SLP |. A running tasklet contains frame
108
+ objects and frame objects contain code objects. And code objects are
109
+ usually incompatible between different minor versions of |CPY |.
110
+
111
+ ======================
112
+ Pickling other objects
113
+ ======================
114
+
115
+ In order to be able to pickle tasklets Stackless needs to be able to pickle
116
+ several other objects, which can't be pickled by |CPY |. |SLP |
117
+ uses :func: `copyreg.pickle ` to register “reduction” functions for the following
118
+ types:
119
+ :data: `~types.FunctionType `,
120
+ :data: `~types.CodeType `,
121
+ :data: `~types.CoroutineType `,
122
+ :data: `~types.GeneratorType `,
123
+ :data: `~types.ModuleType `,
124
+ :data: `~types.TracebackType `,
125
+ :ref: `Cell Objects <cell-objects >` and
126
+ all kinds of :ref: `Dictionary view objects <dict-views >`.
127
+
128
+ Frames
129
+ ======
130
+
131
+ |SLP | can pickle frames, but only as part of a
132
+ tasklet, a traceback-object, a generator, a coroutine or an asynchronous
133
+ generator. Stackless does not register a "reduction" function for
134
+ :data: `~types.FrameType `. This way Stackless stays compatible with application
135
+ code that registers its own "reduction" function for :data: `~types.FrameType `.
136
+
0 commit comments