This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Wolfgang Richter
Recipients Wolfgang Richter
Date 2016-02-11.22:39:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1455230383.33.0.948611163745.issue26344@psf.upfronthosting.co.za>
In-reply-to
Content
My understanding of `sys.meta_path` is that it is supposed to allow customized loading of Python modules and packages.

In fact the `importlib` machinery appears to have support for identifying packages with `__init__` files with non-standard suffixes:

https://github.com/python/cpython/blob/master/Lib/importlib/_bootstrap_external.py#L645

https://github.com/python/cpython/blob/master/Lib/importlib/_bootstrap_external.py#L1233

However, I find that when I `import wolftest` inside a folder with structure:

./
    /wolftest
        /__init__.wolf
        /something.wolf

None of my sys.meta_path finders are called at all, and instead a namespace is returned.

I was wondering why the `import` statement appears to short-circuit and not check with `sys.meta_path` handlers in this case?
History
Date User Action Args
2016-02-11 22:39:43Wolfgang Richtersetrecipients: + Wolfgang Richter
2016-02-11 22:39:43Wolfgang Richtersetmessageid: <1455230383.33.0.948611163745.issue26344@psf.upfronthosting.co.za>
2016-02-11 22:39:43Wolfgang Richterlinkissue26344 messages
2016-02-11 22:39:43Wolfgang Richtercreate