This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author brett.cannon
Recipients brett.cannon
Date 2013-05-29.00:08:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1369786095.97.0.622799229859.issue18088@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2013-05-29 00:08:16brett.cannonsetrecipients: + brett.cannon
2013-05-29 00:08:15brett.cannonsetmessageid: <1369786095.97.0.622799229859.issue18088@psf.upfronthosting.co.za>
2013-05-29 00:08:15brett.cannonlinkissue18088 messages
2013-05-29 00:08:15brett.cannoncreate