]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
- Add new Warning class, ImportWarning
authorThomas Wouters <thomas@python.org>
Thu, 27 Apr 2006 23:13:20 +0000 (23:13 +0000)
committerThomas Wouters <thomas@python.org>
Thu, 27 Apr 2006 23:13:20 +0000 (23:13 +0000)
commit9df4e6f6735af274813cf1b611ee1a342955ad63
treec0ab6329dd61fc03a46932435828210b3d0d3db8
parent2c1e63f8a48bf0f530a922219e85443c4e12882d
 - Add new Warning class, ImportWarning

 - Warn-raise ImportWarning when importing would have picked up a directory
   as package, if only it'd had an __init__.py. This swaps two tests (for
   case-ness and __init__-ness), but case-test is not really more expensive,
   and it's not in a speed-critical section.

 - Test for the new warning by importing a common non-package directory on
   sys.path: site-packages

 - In regrtest.py, silence warnings generated by the build-environment
   because Modules/ (which is added to sys.path for Setup-created modules)
   has 'zlib' and '_ctypes' directories without __init__.py's.
Include/pyerrors.h
Lib/test/exception_hierarchy.txt
Lib/test/regrtest.py
Lib/test/test_import.py
Python/exceptions.c
Python/import.c