`pyimport` fails for intentionally mismatching source/bytecode suffixes
brandonwillard opened this issue · comments
Brandon T. Willard commented
A check occuring here assumes that a module loaded from bytecode with a __file__
attribute ending in pyc
must have a source file with suffix .py
. This is not the case for the code I'm working on (https://github.com/hylang/hy), which has source files with intentionally different suffixes that compile to .pyc
, and ultimately causes pyimport
to fail.
Ronny Pfannschmidt commented
Pytest no longer uses this code path