[issue21986] Pickleability of code objects is inconsistent

2014-10-09 Thread Claudiu Popa
Claudiu Popa added the comment: Terry, can I do something to move this issue forward? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21986 ___

[issue21986] Pickleability of code objects is inconsistent

2014-10-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: Here are the issues for me. 1. Except for your interest, this is a lower priority for me that most all of the other 125 Idle issues. 2. I am not familiar with pickling and wonder about the following in the patch. It deletes a statememt

[issue21986] Pickleability of code objects is inconsistent

2014-10-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 2. It is normal. The third argument of copyreg.pickle() is not used now. The patch LGTM. -- title: Idle: disable pickleability of user code objects - Pickleability of code objects is inconsistent ___ Python

[issue21986] Pickleability of code objects is inconsistent

2014-08-25 Thread Claudiu Popa
Changes by Claudiu Popa pcmantic...@gmail.com: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21986 ___ ___

[issue21986] Pickleability of code objects is inconsistent

2014-07-16 Thread Claudiu Popa
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

[issue21986] Pickleability of code objects is inconsistent

2014-07-16 Thread Martin v . Löwis
Martin v. Löwis added the comment: I agree with Claudiu. IDLE should pickle with a private dispatch_table. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21986 ___

[issue21986] Pickleability of code objects is inconsistent

2014-07-16 Thread ppperry
Changes by ppperry maprea...@olum.org: -- components: +Windows ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21986 ___ ___ Python-bugs-list

[issue21986] Pickleability of code objects is inconsistent

2014-07-16 Thread Claudiu Popa
Claudiu Popa added the comment: Maybe something like the attached patch. It doesn't have tests, though, I didn't find any tests for the idlelib.rpc anyway. -- keywords: +patch Added file: http://bugs.python.org/file35968/idlelib.patch ___ Python

[issue21986] Pickleability of code objects is inconsistent

2014-07-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Instead of copying dispatch_table, use ChainMap. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21986 ___

[issue21986] Pickleability of code objects is inconsistent

2014-07-16 Thread Claudiu Popa
Claudiu Popa added the comment: Thanks, Serhiy. -- Added file: http://bugs.python.org/file35969/issue21986.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21986 ___

[issue21986] Pickleability of code objects is inconsistent

2014-07-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: There is no unittest module for rpc yet. Should the pickle test include a test that pickling a code object fails, and with the proper exception? Is ppperry correct about PicklingError? Chainmap is new in 3.3 so 2.7 would need the copy version of the patch.

[issue21986] Pickleability of code objects is inconsistent

2014-07-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: ppperry: Component Windows (or Macintosh) means Windows (or Mac) specific. The rpc code is general to all systems. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21986

[issue21986] Pickleability of code objects is inconsistent

2014-07-16 Thread Claudiu Popa
Claudiu Popa added the comment: TypeError is raised only in Python 2, in Python 3 it's PicklingError. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21986 ___

[issue21986] Pickleability of code objects is inconsistent

2014-07-15 Thread ppperry
New submission from ppperry: In IDLE: code = compile(dummy_code, test, exec) pickle.dumps(code) cidlelib.rpc\nunpickle_code\np0\n(S'c\\x00\\x00\\x00\\x00\\x00\\x00

[issue21986] Pickleability of code objects is inconsistent

2014-07-15 Thread ppperry
Changes by ppperry maprea...@olum.org: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21986 ___ ___ Python-bugs-list mailing

[issue21986] Pickleability of code objects is inconsistent

2014-07-15 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +kbk, roger.serwy, terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21986 ___ ___

[issue21986] Pickleability of code objects is inconsistent

2014-07-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: Code is really a code object, so the compile does not seem to be the problem. In 2.7, on Win7, I get exactly the same output after removing the possibly spurious space in the string posted. (ppperry), what system (OS) are you using. (In the future, please