Serhiy Storchaka added the comment:
PyShell imports non-idlelib modules, including re, before idlelib modules,
such as rpc. So the re addition is there, though I strongly doubt that
compiled regexs are every sent to the user process.
But we can't guarantee that this alway will be so. Other
Serhiy Storchaka added the comment:
It would be good to add a test of rpc.dumps().
Current code copies copyreg.dispatch_table at the moment of rpc import. But it
can be changed later and these change will not affect private copy. For example
the re module adds pickleability of compiled regex
Terry J. Reedy added the comment:
I agree that a test for dumps would be a good idea. Ditto for hundreds of
other untested functions. I don't see this one as a priority.
PyShell imports non-idlelib modules, including re, before idlelib modules, such
as rpc. So the re addition is there,
Roundup Robot added the comment:
New changeset 90c62e1f3658 by Terry Jan Reedy in branch '3.4':
Issue #21986: Idle now matches interpreter in not pickling user code objects.
https://hg.python.org/cpython/rev/90c62e1f3658
New changeset cb94764bf8be by Terry Jan Reedy in branch 'default':
Merge
Changes by Terry J. Reedy tjre...@udel.edu:
--
assignee: - terry.reedy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21986
___
___
Terry J. Reedy added the comment:
Code objects get wrapped in 3 tuple layers before being 'pickled', so a private
dispatch is the easiet solution. Since copyreg.dispatch_table has only two
items to copy, I pushed a version of the first patch. Since private dispatch
tables are new in 3.3 and
Changes by Terry J. Reedy tjre...@udel.edu:
--
title: Pickleability of code objects is inconsistent - Idle: disable
pickleability of user code objects
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21986
Changes by Serhiy Storchaka storch...@gmail.com:
--
title: Pickleability of code objects is inconsistent - Idle: disable
pickleability of user code objects
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21986
Claudiu Popa added the comment:
Thank you for your feedback, Terry.
1. IDLE is behaving differently than the builtin interpreter. It should be
higher priority, because it
leads beginners into believing that code objects are picklable.
2. No, wrapping code objects in a CodePickler with
Terry J. Reedy added the comment:
Wanting to make sure that a patch does not break Idle makes perfect sense to
me. As it turns out, running *any* code from the editor (even empty) works for
these patches. Idle compiles the code to a code object *in the Idle process*
and if no compile
10 matches
Mail list logo