[New-bugs-announce] [issue18088] Create importlib.abc.Loader.init_module_attrs()

Brett Cannon report at bugs.python.org
Wed May 29 02:08:15 CEST 2013

New submission from Brett Cannon:

There are a bunch of attributes that need to be set on a module, and yet they are only handled by various decorators in importlib.util. The problem with that is there is no way in the API to override or expand upon setting those attributes pre-loading; only post-loading like what set_loader and set_package do.

importlib.abc.Loader.init_module_attrs(module) would take a module and then using whatever methods are available, sets as many attributes as possible. This method can either be called before execution of the module's code or after some function is called that directly returns a loaded module (e.g. BuiltinImporter).

assignee: brett.cannon
components: Library (Lib)
messages: 190260
nosy: brett.cannon
priority: normal
severity: normal
stage: test needed
status: open
title: Create importlib.abc.Loader.init_module_attrs()
type: enhancement
versions: Python 3.4

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list