Commit Graph

218 Commits

Author SHA1 Message Date
Brett Cannon 44c5481941 Fix a doc typo. 2009-03-16 22:30:11 +00:00
Brett Cannon 8d11013169 Implement InspectLoader for FrozenImporter. 2009-03-15 02:20:16 +00:00
Brett Cannon a113ac58be Implement InspectLoader for BuiltinImporter. 2009-03-15 01:41:33 +00:00
Georg Brandl ae2dbe2543 #5486: typos. 2009-03-13 19:04:40 +00:00
Brett Cannon 2cf03a8204 Implement importlib.util.set_loader: a decorator to automatically set
__loader__ on modules.
2009-03-10 05:17:37 +00:00
Brett Cannon d43b30b046 Implement get_source for importlib.abc.PyLoader using source_path and get_data. 2009-03-10 03:29:23 +00:00
Brett Cannon 9c751b7246 Fix some reST mishaps. 2009-03-09 16:28:16 +00:00
Brett Cannon ad876c7083 Clarify an assumption that importlib.abc.PyLoader makes when importing a
package and setting __path__.
2009-03-09 07:53:09 +00:00
Brett Cannon 2a922ed6ad Introduce importlib.abc. The module contains various ABCs related to imports
(mostly stuff specified by PEP 302). There are two ABCs, PyLoader and
PyPycLoader, which help with implementing source and source/bytecode loaders by
implementing load_module in terms of other methods. This removes a lot of
gritty details loaders typically have to worry about.
2009-03-09 03:35:50 +00:00
Brett Cannon 435aad878c Rename importlib.util.set___package__ to set_package. 2009-03-04 16:07:00 +00:00
Brett Cannon 57b46f5b0e Expose importlib.util.set___package__. 2009-03-02 14:38:26 +00:00
Brett Cannon d2e7b33815 Implement the more specific PEP 302 semantics for loaders and what happens upon
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.
2009-02-17 02:45:03 +00:00
Brett Cannon debb98d91f Document importlib.machinery.PathFinder. 2009-02-16 04:18:01 +00:00
Brett Cannon 2c318a1390 Rewrite the code implementing __import__ for importlib. Now it is much simpler
and relies much more on meta path finders to abstract out various parts of
import.

As part of this the semantics for import_module tightened up and now follow
__import__ much more closely (biggest thing is that the 'package' argument must
now already be imported, else a SystemError is raised).
2009-02-07 01:15:27 +00:00
Benjamin Peterson 97d3aa50b7 use the classmethod directive 2009-01-25 19:44:16 +00:00
Brett Cannon 78246b6b45 Document both importlib.machinery.BuiltinImporter and FrozenImporter. 2009-01-25 04:56:30 +00:00
Brett Cannon 33418c8feb Fix markup for arguments in importlib docs. 2009-01-22 18:37:20 +00:00
Brett Cannon afccd63ac9 Document the (very small) public API for importlib. As time goes on and some
key refactorings occur more of the API will be exposed and documented.
2009-01-20 02:21:27 +00:00