Nick Coghlan added the comment:

Further thoughts:

1. Let's keep Finder as a generic base class for "things which find module 
loaders", with its current implementation but an updated docstring and 
documentation.

2. The reason both the MetaPathFinder and PathEntryHander ABCs need to preserve 
the Finder API for find_module is for backwards compatibility with third party 
reimplementations of the PEP 302 protocol.

3. importlib changes:
- add MetaPathFinder and PathEntryHandler
- inherit from MetaPathFinder or PathEntryHandler as appropriate (instead of 
directly from Finder)
- rename FileFinder to DirectoryHandler (keeping the former as a legacy alias)

4. Longer term, we should deprecate find_module() completely, and add a 
meta-path appropriate find_loader(fullname, path) definition that allows 
multiple meta path finders to contribute to a namespace package. Finder would 
effectively become an empty categorisation ABC. This plan should be elaborated 
in a PEP for 3.4

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15502>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to