summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_importhooks.py
Commit message (Collapse)AuthorAgeFilesLines
* Update graminit.c for the fix for #1488915, Multiple dots in relative importThomas Wouters2006-05-251-1/+10
| | | | statement raise SyntaxError, and add testcase.
* Whitespace normalization.Tim Peters2006-03-091-1/+1
|
* Oops, urllib may or may not already be loaded.Neal Norwitz2006-03-041-1/+4
|
* Fix spurious test failure of test_socket_ssl when run in this order:Neal Norwitz2006-03-041-0/+4
| | | | | | | test_codecmaps_tw test_importhooks test_socket_ssl I don't completely understand the cause, but there's a lot of import magic going on and this is the smallest change which fixes the problem.
* Whitespace normalization.Tim Peters2006-02-281-2/+2
|
* SF patch #1438387, PEP 328: relative and absolute imports.Thomas Wouters2006-02-281-0/+40
| | | | | | | | | | | | | | | | | | | | | | | - IMPORT_NAME takes an extra argument from the stack: the relativeness of the import. Only passed to __import__ when it's not -1. - __import__() takes an optional 5th argument for the same thing; it __defaults to -1 (old semantics: try relative, then absolute) - 'from . import name' imports name (be it module or regular attribute) from the current module's *package*. Likewise, 'from .module import name' will import name from a sibling to the current module. - Importing from outside a package is not allowed; 'from . import sys' in a toplevel module will not work, nor will 'from .. import sys' in a (single-level) package. - 'from __future__ import absolute_import' will turn on the new semantics for import and from-import: imports will be absolute, except for from-import with dots. Includes tests for regular imports and importhooks, parser changes and a NEWS item, but no compiler-package changes or documentation changes.
* Whitespace normalization.Tim Peters2004-09-241-1/+1
|
* Fix for SF bug #1029475 : reload() doesn't work with PEP 302 loaders.Phillip J. Eby2004-09-231-2/+16
|
* Actually run these tests from regrtest.py.Neal Norwitz2003-02-171-1/+3
| | | | | | There was no test_main() and the main body was protected by if __name__ == '__main__' so the test didn't happen on import either.
* PEP 302 + zipimport:Just van Rossum2002-12-301-0/+204
- new import hooks in import.c, exposed in the sys module - new module called 'zipimport' - various changes to allow bootstrapping from zip files I hope I didn't break the Windows build (or anything else for that matter), but then again, it's been sitting on sf long enough... Regarding the latest discussions on python-dev: zipimport sets pkg.__path__ as specified in PEP 273, and likewise, sys.path item such as /path/to/Archive.zip/subdir/ are supported again.