- 21 Nov, 2014 1 commit
-
-
Serhiy Storchaka authored
-
- 30 May, 2014 1 commit
-
-
Brett Cannon authored
Along the way, dismantle importlib._bootstrap._SpecMethods as it was no longer relevant and constructing the new function required partially dismantling the class anyway.
-
- 04 Apr, 2014 1 commit
-
-
Brett Cannon authored
-
- 25 Jan, 2014 1 commit
-
-
Eric Snow authored
The function is also moved to importlib.util.
-
- 07 Jan, 2014 1 commit
-
-
Eric Snow authored
-
- 22 Nov, 2013 1 commit
-
-
Eric Snow authored
-
- 16 Jun, 2013 1 commit
-
-
Brett Cannon authored
The helper function makes it easier to implement imoprtlib.abc.InspectLoader.get_source() by making that function require just the raw bytes for source code and handling all other details.
-
- 15 Jun, 2013 1 commit
-
-
Brett Cannon authored
-
- 14 Jun, 2013 1 commit
-
-
Brett Cannon authored
deprecation of imp.get_magic().
-
- 31 May, 2013 2 commits
-
-
Brett Cannon authored
-
Brett Cannon authored
importlib.abc.Loader.init_module_attrs() and implement importlib.abc.InspectLoader.load_module(). The importlib.abc.Loader.init_module_attrs() method sets the various attributes on the module being loaded. It is done unconditionally to support reloading. Typically people used importlib.util.module_for_loader, but since that's a decorator there was no way to override it's actions, so init_module_attrs() came into existence to allow for overriding. This is also why module_for_loader is now pending deprecation (having its other use replaced by importlib.util.module_to_load). All of this allowed for importlib.abc.InspectLoader.load_module() to be implemented. At this point you can now implement a loader with nothing more than get_code() (which only requires get_source(); package support requires is_package()). Thanks to init_module_attrs() the implementation of load_module() is basically a context manager containing 2 methods calls, a call to exec(), and a return statement.
-
- 30 May, 2013 1 commit
-
-
Brett Cannon authored
explains better what the context manager is providing.
-
- 28 May, 2013 1 commit
-
-
Brett Cannon authored
handle providing (and cleaning up if needed) the module to be loaded. A future commit will use the context manager in Lib/importlib/_bootstrap.py and thus why the code is placed there instead of in Lib/importlib/util.py.
-
- 13 May, 2012 1 commit
-
-
Brett Cannon authored
-
- 17 Apr, 2010 1 commit
-
-
Barry Warsaw authored
-
- 10 Mar, 2009 1 commit
-
-
Brett Cannon authored
__loader__ on modules.
-
- 04 Mar, 2009 1 commit
-
-
Brett Cannon authored
-
- 02 Mar, 2009 1 commit
-
-
Brett Cannon authored
-
- 17 Feb, 2009 1 commit
-
-
Brett Cannon authored
load failure in relation to reloads. Also expose importlib.util.module_for_loader to handle all of the details of this along with making sure all current loaders behave nicely.
-