Message387018
Do you have a reproducer that does not use cloudpickle?
Pickling functions seems to work correctly.
>>> import pickle
>>> def func():
... return len([])
...
>>> func2 = pickle.loads(pickle.dumps(func))
>>>
>>> func2()
0
How is cloudpickle supposed to work? It looks like the globals dict passed to FunctionType(...) lacks a __builtins__. |
|
Date |
User |
Action |
Args |
2021-02-15 15:37:55 | Mark.Shannon | set | recipients:
+ Mark.Shannon, vstinner, frenzy, pablogsal |
2021-02-15 15:37:55 | Mark.Shannon | set | messageid: <1613403475.66.0.398779699756.issue43228@roundup.psfhosted.org> |
2021-02-15 15:37:55 | Mark.Shannon | link | issue43228 messages |
2021-02-15 15:37:55 | Mark.Shannon | create | |
|