[New-bugs-announce] [issue16492] Add a load_parents argument to importlib.find_loader()

Brett Cannon report at bugs.python.org
Sat Nov 17 15:38:51 CET 2012


New submission from Brett Cannon:

To make using importlib.find_loader() easier, there should be a flag that says to automatically import all parent packages for the desired submodule so as to not force the user to do it::

  def find_loader(name, path=None, *, load_parents=False): ...

That way people who are okay with loading some packages implicitly to get at a specific loader can do so without having to do boilerplate name.split('.'); import each parent code. Also means people don't have to worry about the path argument (unless they explicitly want to trigger loading from a different location).

----------
components: Library (Lib)
messages: 175742
nosy: brett.cannon
priority: low
severity: normal
stage: test needed
status: open
title: Add a load_parents argument to importlib.find_loader()
type: enhancement
versions: Python 3.4

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


More information about the New-bugs-announce mailing list