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

Alexander Belopolsky report at bugs.python.org
Thu Jul 1 19:52:59 CEST 2010

Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

On Thu, Jul 1, 2010 at 12:18 PM, Antoine Pitrou <report at bugs.python.org> 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 modules, using
> Alexandre's suggestion.

Yes, you can make import_module_implementations('io') return [io] this way, but what the user is likely to expect would be [io, _pyio].

I understand that there are reasons to keep io the way it is, but most of the other modules should probably follow pickle approach.  In any case, testing alternative io implementations is easy.  No import block trickery is needed - just import io and _pyio separately.

I just don't like the idea of having test.support know details about other modules and would like to have a clear use case before doing anything more sophisticated than blocking '_' + name.

If we end up with a central registry of native optimizations, it should probably not be in test.support.


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list