[Python-ideas] Make MappingProxyType picklable
Yury Selivanov
yselivanov.ml at gmail.com
Sat Feb 22 04:26:43 CET 2014
Antony,
On 2/21/2014, 9:13 PM, Antony Lee wrote:
> Currently, mappingproxies are not picklable, which (among other things)
> lead to signature objects being non picklable. Could this be easily fixed,
> or is there a stronger reason for not allowing that pickling?
> If mappingproxies cannot be made picklable, perhaps signatures can
> implement __getnewargs__ to allow pickling?
> Antony
>
Good catch. I think we'll make Signatures picklable in 3.5
(http://bugs.python.org/issue20726) It can be implemented
using __reduce__ and __setstate__ methods. We can't use
__getnewargs__ as we have keyword-only arguments in
Parameter and Signature classes (but maybe we'll be able
to use __getnewargs_ex__ in 3.5)
Do you have any other reasons to make mappingproxies
picklable?
Yury
More information about the Python-ideas
mailing list