[issue21986] Pickleability of code objects is inconsistent

Claudiu Popa report at bugs.python.org
Wed Jul 16 08:10:40 CEST 2014


Claudiu Popa added the comment:

It works in IDLE because it registers a custom pickling for code objects, in idlelib.rpc:

  copyreg.pickle(types.CodeType, pickle_code, unpickle_code)


where pickle_code / unpickle_code calls marshal.dumps/loads.

Although, I admit that this is weird. If idlelib.rpc is using this for transferring data between RPC instances, that's okay, but leaking the behaviour in the IDLE's interactive interpreter is not that okay, because leads to different results and expectancies between IDLE and Python's interactive interpreter.

----------
nosy: +Claudiu.Popa

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21986>
_______________________________________


More information about the Python-bugs-list mailing list