[issue8727] test_import failure
Brett Cannon
report at bugs.python.org
Sun May 16 00:50:50 CEST 2010
Brett Cannon <brett at python.org> added the comment:
I found the cause of the failure.
When Barry implemented PEP 3147, he made PyPycLoader.bytecode_path() operate as if the only possible bytecode file one would want is the __cached__ one. That obviously is not accurate in the face of source-less modules. So the test_import is failing because it is not even attempting a bytecode-only import.
What this means is that importlib needs to change its implementation of bytecode_path() to return the proper path based on whether the source exists. I will get to that hopefully this week. In the mean time I have flagged the test as an expected failure.
This also shows me even more that I need to redo the ABCs in importlib to essentially make bytecode an optimization that the ABC handles and that is not exposed to the importer implementer.
----------
assignee: -> brett.cannon
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8727>
_______________________________________
More information about the Python-bugs-list
mailing list