Commit graph

26 commits

Author SHA1 Message Date
Brett Cannon
6253871910 Clean up a minor bit of wording. 2009-08-18 23:54:07 +00:00
Brett Cannon
23460291ec Make the wdocs for importlib.abc.ExecutionLoader to be weaker in terms of what is needed to execute a module. 2009-07-20 22:59:00 +00:00
Brett Cannon
6919427e94 Implement the PEP 302 protocol for get_filename() as
importlib.abc.ExecutionLoader. PyLoader now inherits from this ABC instead of
InspectLoader directly. Both PyLoader and PyPycLoader provide concrete
implementations of get_filename in terms of source_path and bytecode_path.
2009-07-20 04:23:48 +00:00
Tarek Ziadé
434caaab75 typo 2009-05-14 12:48:09 +00:00
Brett Cannon
bc6c2b5c6b Explain a little about the explanation. 2009-04-01 23:36:48 +00:00
Brett Cannon
9f4cb1c89d Add a meta path importer example. 2009-04-01 23:26:47 +00:00
Brett Cannon
16248a49b9 Add some clarification to the importlib docs. 2009-04-01 20:47:14 +00:00
Guido van Rossum
0961354874 Thorough review of importlib docs. Reviewed by Brett himself. 2009-03-30 20:34:57 +00:00
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