[issue9104] test_exceptions does not test pickling with pickle.py

2013-03-14 Thread Ezio Melotti
Ezio Melotti added the comment: > there's an issue about that. That would be #8273. See also #17037 and PEP 399. -- nosy: +ezio.melotti ___ Python tracker ___ __

[issue9104] test_exceptions does not test pickling with pickle.py

2010-07-01 Thread R. David Murray
R. David Murray added the comment: If not in test.support, then where? Unless there's some reason for user code or other implementations (or stdlib code itself) to access that map, it seems to me that test.support is exactly where it belongs. Generic test support (that isn't specific to Pyth

[issue9104] test_exceptions does not test pickling with pickle.py

2010-07-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Jul 1, 2010 at 12:18 PM, Antoine Pitrou wrote: .. >> I don't understand how having multiple modules in the blocked list >> will help in io case.  io.py will simply not work if _io is blocked. > > Which you avoid by giving an empty list of blocked

[issue9104] test_exceptions does not test pickling with pickle.py

2010-07-01 Thread R. David Murray
R. David Murray added the comment: Please don't update the reST document. The support module should never have been documented outside the module itself, because now we are pretty much committed to otherwise needless backward compatibility for the stuff that is documented. -- nosy:

[issue9104] test_exceptions does not test pickling with pickle.py

2010-07-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > You can make the dictionary values as lists for the 'blocked' > > argument for import_fresh_module(). That would work [for io]. > > I don't understand how having multiple modules in the blocked list > will help in io case. io.py will simply not work if _io

[issue9104] test_exceptions does not test pickling with pickle.py

2010-07-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > You can make the dictionary values as lists for the 'blocked' > argument for import_fresh_module(). That would work [for io]. I don't understand how having multiple modules in the blocked list will help in io case. io.py will simply not work if _io is

[issue9104] test_exceptions does not test pickling with pickle.py

2010-06-30 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: > It works for pickle/_pickle and heapq/_heapq, but won't work for io/_io/_pyio. You can make the dictionary values as lists for the 'blocked' argument for import_fresh_module(). That would work. And, can you add documentation for import_module_implemen

[issue9104] test_exceptions does not test pickling with pickle.py

2010-06-30 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky resolution: -> accepted stage: patch review -> commit review ___ Python tracker ___

[issue9104] test_exceptions does not test pickling with pickle.py

2010-06-30 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I would like to commit this as written. If a better mechanism for associating native implementation with a pure python module is found, it can easily be added in the future. Any objections? The patch only adds more test cases, no code is changed. --

[issue9104] test_exceptions does not test pickling with pickle.py

2010-06-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > An explicit dictionary to map the Python and C implementations may be a > better approach. Do you mean a global optimized_module = {'pickle': '_pickle'} in test/support.py? I don't think I like this idea. Even with an explicit dictionary like th

[issue9104] test_exceptions does not test pickling with pickle.py

2010-06-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: > An explicit dictionary to map the Python and C implementations may be a > better approach. +1. -- ___ Python tracker ___ ___

[issue9104] test_exceptions does not test pickling with pickle.py

2010-06-28 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: The code for import_module_implementations seems a bit fragile. Prefixing the module name with an underscore might not always yield the name of the optimized implementation. An explicit dictionary to map the Python and C implementations may be a better

[issue9104] test_exceptions does not test pickling with pickle.py

2010-06-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file17794/issue9104.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue9104] test_exceptions does not test pickling with pickle.py

2010-06-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17793/issue9104.diff ___ Python tracker ___ ___ Python-bugs-list mai

[issue9104] test_exceptions does not test pickling with pickle.py

2010-06-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: In the new patch, issue9104.diff, I factored out import machinery into test.support.import_module_implementations and added it to a a couple of other test modules. I did not attempt to improve all pickle tests. The availability of import_module_impleme

[issue9104] test_exceptions does not test pickling with pickle.py

2010-06-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: It looks good on the principle. As you say, factoring out this kind of machinery in test.support is probably the way to go. -- ___ Python tracker _

[issue9104] test_exceptions does not test pickling with pickle.py

2010-06-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue9104] test_exceptions does not test pickling with pickle.py

2010-06-28 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : This is probably one example of many where pickling is only tested with _pickle module if it is available rather than separately with C and Python implementation. I am attaching a patch which implements one possible testing strategy. If this is acce