[pypy-issue] [issue1647] using django-imagekit results in ImportError

Amaury Forgeot d'Arc tracker at bugs.pypy.org
Sat Nov 30 17:30:57 CET 2013

Amaury Forgeot d'Arc <amauryfa at gmail.com> 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


import mymodule
print(mymodule)  # <module 'sys'>
assert 'mymodule' not in sys.modules

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list