Amaury Forgeot d'Arc <[email protected]> added the comment:
Here is a script which passes with CPython (2 and 3) but fails with pypy:
import sys
class MyImporter(object):
def find_module(self, name, path=None):
if name == 'mymodule':
return self
def load_module(self, name):
assert name == 'mymodule'
return sys # Another module
sys.meta_path.append(MyImporter())
import mymodule
print(mymodule) # <module 'sys'>
assert 'mymodule' not in sys.modules
________________________________________
PyPy bug tracker <[email protected]>
<https://bugs.pypy.org/issue1647>
________________________________________
_______________________________________________
pypy-issue mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-issue