- 01 Jun, 2013 2 commits
-
-
Benjamin Peterson authored
-
Brett Cannon authored
Previously __path__ was set to [__name__], but that could lead to bad results if someone managed to circumvent the frozen importer and somehow ended up with a finder that thought __name__ was a legit directory/location.
-
- 31 May, 2013 12 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.
-
Brett Cannon authored
-
Brett Cannon authored
-
Brett Cannon authored
control whether to reset the module's __name__ attribute in case a reload is being done.
-
Brett Cannon authored
-
Brett Cannon authored
-
Serhiy Storchaka authored
-
Serhiy Storchaka authored
-
Terry Jan Reedy authored
-
Terry Jan Reedy authored
-
Terry Jan Reedy authored
-
- 30 May, 2013 2 commits
-
-
Brett Cannon authored
explains better what the context manager is providing.
-
Łukasz Langa authored
Patch by Ronald Oussoren
-
- 29 May, 2013 16 commits
-
-
Serhiy Storchaka authored
-
Serhiy Storchaka authored
Original patch by Hideaki Takahashi.
-
Stefan Krah authored
-
Stefan Krah authored
-
Stefan Krah authored
-
Stefan Krah authored
-
Stefan Krah authored
-
Stefan Krah authored
-
Serhiy Storchaka authored
PyObject_CallMethod() now changed to `const char*`. Based on patches by Jörg Müller and Lars Buitinck.
-
Stefan Krah authored
-
Stefan Krah authored
character in _decimal.c.
-
Senthil Kumaran authored
#17403: urllib.parse.robotparser normalizes the urls before adding to ruleline. This helps in handling certain types invalid urls in a conservative manner. Patch contributed by Mher Movsisyan.
-
Senthil Kumaran authored
This helps in handling certain types invalid urls in a conservative manner.
-
Terry Jan Reedy authored
-
Terry Jan Reedy authored
touchup test_idle. Rename README.txt.
-
Andrew Kuchling authored
-
- 28 May, 2013 8 commits
-
-
Ned Deily authored
-
Ned Deily authored
is overriden with the CC environment variable, use the new compiler as the default for linking if LDSHARED is not also overriden. This restores Distutils behavior introduced in 3.2.3 and inadvertently dropped in 3.3.0.
-
Brett Cannon authored
-
Brett Cannon authored
and __package__ unconditionally in order to do the right thing for reloading.
-
Brett Cannon authored
-
Brett Cannon authored
-
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.
-
Serhiy Storchaka authored
-