diff -r 01397c11ebb8 Doc/glossary.rst --- a/Doc/glossary.rst Thu Dec 03 01:36:03 2015 +0000 +++ b/Doc/glossary.rst Thu Dec 03 17:08:10 2015 +0000 @@ -309,9 +309,13 @@ finder An object that tries to find the :term:`loader` for a module. It must - implement either a method named :meth:`find_loader` or a method named - :meth:`find_module`. See :pep:`302` and :pep:`420` for details and - :class:`importlib.abc.Finder` for an :term:`abstract base class`. + implement at least one of the methods :meth:`find_spec`, + :meth:`find_loader` or :meth:`find_module`. + + Since Python 3.3, there are two types of finder: :term:`meta path finders + ` and :term:`path entry finders `. + + See :pep:`302`, :pep:`420` and :pep:`451` for much more detail. floor division Mathematical division that rounds down to nearest integer. The floor @@ -593,10 +597,13 @@ :class:`collections.OrderedDict` and :class:`collections.Counter`. meta path finder - A finder returned by a search of :data:`sys.meta_path`. Meta path + A :term:`finder` returned by a search of :data:`sys.meta_path`. Meta path finders are related to, but different from :term:`path entry finders `. + See :class:`importlib.abc.MetaPathFinder` for the methods that meta path + finders implement. + metaclass The class of a class. Class definitions create a class name, a class dictionary, and a list of base classes. The metaclass is responsible for @@ -630,7 +637,7 @@ module spec A namespace containing the import-related information used to load a - module. + module. An instance of :class:`importlib.machinery.ModuleSpec`. MRO See :term:`method resolution order`. @@ -757,6 +764,9 @@ (i.e. a :term:`path entry hook`) which knows how to locate modules given a :term:`path entry`. + See :class:`importlib.abc.PathEntryFinder` for the methods that path entry + finders implement. + path entry hook A callable on the :data:`sys.path_hook` list which returns a :term:`path entry finder` if it knows how to find modules on a specific :term:`path diff -r 01397c11ebb8 Doc/library/sys.rst --- a/Doc/library/sys.rst Thu Dec 03 01:36:03 2015 +0000 +++ b/Doc/library/sys.rst Thu Dec 03 17:08:10 2015 +0000 @@ -779,18 +779,21 @@ .. data:: meta_path - A list of :term:`finder` objects that have their :meth:`find_module` + A list of :term:`meta path finder` objects that have their :meth:`find_spec` methods called to see if one of the objects can find the module to be - imported. The :meth:`find_module` method is called at least with the + imported. The :meth:`find_spec` method is called with at least the absolute name of the module being imported. If the module to be imported is - contained in package then the parent package's :attr:`__path__` attribute - is passed in as a second argument. The method returns ``None`` if - the module cannot be found, else returns a :term:`loader`. + contained in a package, then the parent package's :attr:`__path__` attribute + is passed in as a second argument. The method returns a :term:`module spec`, + or ``None`` if the module cannot be found. - :data:`sys.meta_path` is searched before any implicit default finders or - :data:`sys.path`. + .. seealso:: - See :pep:`302` for the original specification. + :class:`importlib.abc.MetaPathFinder` + The abstract base class defining the interface of finder objects on + :data:`meta_path`. + :class:`importlib.machinery.ModuleSpec` + The concrete class which :meth:`find_spec` should return instances of. .. data:: modules