[issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec)

Eric Snow report at bugs.python.org
Tue Nov 12 00:55:36 CET 2013


Eric Snow added the comment:

> (I still like the idea of passing
> a target to importlib.find_spec - I just no longer think we should be
> passing that down to the finders themselves).

Passing the target to the finders isn't just for the sake of any implicit "check_target" test, though that was the original motivator.  It also allows the finder to decide between multiple loaders based on other criteria related to the target (but not necessarily the loader).  I think it was a good addition to the API regardless.

> Another thing we need to check we have a test for: ensuring reloading a
> namespace module picks up new directories added since it was first loaded.

Agreed.  Furthermore, such a test is worthwhile outside the context of PEP 451.  I'm tempted to say we're already covered with existing tests, but reload is goofy enough that an explicit test is worth it.

> This would all be so much easier if reloading wasn't supported in the first
> place :)

So very true. :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18864>
_______________________________________


More information about the Python-bugs-list mailing list