Commit Graph

21 Commits

Author SHA1 Message Date
Brett Cannon e2d0295f0f Specify that load_module is to raise ImportError if an error has occurred and
no exceptino is being propagated or it has been asked to load a module that it
cannot.

Also specify that __name__ must be set on all loaded modules.
2007-04-29 20:19:50 +00:00
Brett Cannon 4c8c08686b Fix a minor grammar error. 2006-10-20 02:07:00 +00:00
Georg Brandl 790d967970 Add a sentence clarifying that once a path_hooks importer has
been found for a sys.path entry, the builtin import machinery will not
handle that entry any longer.
2006-08-11 07:11:14 +00:00
David Goodger f7ec3048fd patch from Paul Moore 2006-02-24 22:47:18 +00:00
David Goodger fe4d196e3f not complete; I stand corrected ;-) 2004-09-28 12:39:00 +00:00
David Goodger 2cd6800e7b details and clarifications, should have been checked in long ago 2004-09-28 01:11:15 +00:00
Phillip J. Eby ec6e1005bd It's PyImport_AddModule, not PyImport_ModuleAdd. Fix Python code sample
to do the right thing for reload() to work.  Revise explanation so it's
clear what to do to fulfill reload()'s requirements in both C and Python.
2004-09-23 13:54:53 +00:00
Phillip J. Eby 9822ad205e Fix specification error that makes it impossible for 'reload()' to work
correctly with PEP 302 module loaders.  See also SF#1029475, and:

http://mail.python.org/pipermail/python-dev/2004-September/048970.html
2004-09-23 04:06:40 +00:00
Just van Rossum 1d35ead05d - added two items from Paul Moore to "Open Issues"
- removed section that still mentioned importers-on-sys.path
2003-01-02 18:47:04 +00:00
Just van Rossum b24983fdf7 2.3a1 integration note 2003-01-01 20:22:03 +00:00
Just van Rossum 59bf4255f7 removed get_package_path(), is_package() is back 2002-12-30 22:39:07 +00:00
Just van Rossum 7af5202bac - renamed __import__ to __loader__
- changed the get_data() definition
2002-12-30 21:23:57 +00:00
Just van Rossum bab98b7f32 - removed the importer-on-sys.path feature (an update patch will be posted
later)
- renamed imp.find_module2() to imp.get_loader() as suggested by Guido.
2002-12-28 10:16:07 +00:00
Just van Rossum 66feff0738 one more subtlety 2002-12-26 19:03:22 +00:00
Just van Rossum a83a6e2b05 fixed a typo 2002-12-26 18:06:11 +00:00
Just van Rossum d208dc5175 Fixed naive description of how relative imports work (spotted by Guido). 2002-12-26 18:00:40 +00:00
Just van Rossum 6d66240b0c - some whitespace normalization (two spaces after sentence endings; yuck! ;-)
- minor edits
- added short Forward Compatibility section
- added comment about the Quixote/PTL use case to Open Issues
2002-12-24 20:36:32 +00:00
Just van Rossum e7d8b40694 added note about the need of more introspective features: listing available modules and data files. 2002-12-23 22:46:21 +00:00
Just van Rossum 74737f0d45 - some reflow caused by David Goodger's spell checking
- added "Optional Extensions to the Importer Protocol" section
- fixed flaw in the importer protocol: i.find_module() will now receive
  the package.__path__ (or None for a plain module) as an additional
  argument, if it's installed on sys.meta_path. This is needed to
  be able to add a hook that implements the full sys.path/pkg.__path__
  semantics. See also footnote [7]. The patch on sf will be updated
  shortly to match the new version of the PEP.
2002-12-23 22:13:48 +00:00
David Goodger fb0080cbcb Spell checked 2002-12-21 19:51:05 +00:00
Just van Rossum 650c382d0e New Import Hooks PEP 2002-12-20 13:07:24 +00:00