File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,11 +94,10 @@ Functions
9494 :exc: `ValueError ` is raised). Otherwise a search using :attr: `sys.meta_path `
9595 is done. ``None `` is returned if no loader is found.
9696
97- A dotted name does not have its parent's implicitly imported. If that is
98- desired (although not nessarily required to find the loader, it will most
99- likely be needed if the loader actually is used to load the module), then
100- you will have to import the packages containing the module prior to calling
101- this function.
97+ A dotted name does not have its parent's implicitly imported as that requires
98+ loading them and that may not be desired. To properly import a submodule you
99+ will need to import all parent packages of the submodule and use the correct
100+ argument to *path *.
102101
103102.. function :: invalidate_caches()
104103
Original file line number Diff line number Diff line change @@ -55,7 +55,9 @@ def find_loader(name, path=None):
5555 value of 'path' given to the finders. None is returned if no loader could
5656 be found.
5757
58- Dotted names do not have their parent packages implicitly imported.
58+ Dotted names do not have their parent packages implicitly imported. You will
59+ most likely need to explicitly import all parent packages in the proper
60+ order for a submodule to get the correct loader.
5961
6062 """
6163 try :
Original file line number Diff line number Diff line change @@ -271,6 +271,9 @@ Tools/Demos
271271Documentation
272272-------------
273273
274+ - Issue #16489: Make it clearer that importlib.find_loader() requires any and
275+ all packages to be separately imported.
276+
274277- Issue #16400: Update the description of which versions of a given package
275278 PyPI displays.
276279
You can’t perform that action at this time.
0 commit comments