Commit Graph

51 Commits

Author SHA1 Message Date
Antoine Pitrou
bc1a7ddc9b Check-in compiled importlib changes (you must run "make" after modifying the importlib sources). 2012-07-07 19:49:44 +02:00
Brett Cannon
98979b85e7 Issue #15166: Re-implement imp.get_tag() using sys.implementation.
Also eliminates some C code in Python/import.c as well.

Patch by Eric Snow with verification by comparing against another
patch from Jeff Knupp.
2012-07-02 15:13:11 -04:00
Antoine Pitrou
0ab5cf9b46 Issue #15181: importlib bytecode is unsigned and shouldn't have negative numbers.
This fixes a compiler warning with suncc.
2012-06-25 17:32:43 +02:00
Eric V. Smith
e51a36922f Fixes issue 15039: namespace packages are no longer imported in preference to modules of the same name. 2012-06-24 19:13:55 -04:00
Antoine Pitrou
310f95b04d A better repr() for FileFinder 2012-06-23 02:12:56 +02:00
Antoine Pitrou
e67f48ce5e Issue #14928: Fix importlib bootstrap issues by using a custom executable (Modules/_freeze_importlib) to build Python/importlib.h. 2012-06-19 22:29:35 +02:00
Antoine Pitrou
1d25b6f04a Issue #15103: remove the NUL character (serving as a Mercurial binary marker) from Python/importlib.h.
Instead the email notification hook uses a configuration option to omit importlib.h diffs.
2012-06-19 16:33:39 +02:00
Antoine Pitrou
2d9db1dfce Try to fix issue #15086: build failure on Ubuntu shared buildbot. 2012-06-17 00:27:30 +02:00
Brett Cannon
99d776fdf4 Update importlib.h by touching Lib/importlib/_bootstrap.py. 2012-06-11 11:02:53 -04:00
Nick Coghlan
5c6eba3a93 Tweak importlib._bootstrap to avoid zero-argument super so I can work on issue #14857 without breaking imports 2012-05-27 17:49:58 +10:00
Brett Cannon
d785cb3955 Remove some redundant decorators. 2012-05-26 14:28:21 -04:00
Eric V. Smith
984b11f88f issue 14660: Implement PEP 420, namespace packages. 2012-05-24 20:21:04 -04:00
Antoine Pitrou
ea3eb88bca Issue #9260: A finer-grained import lock.
Most of the import sequence now uses per-module locks rather than the
global import lock, eliminating well-known issues with threads and imports.
2012-05-17 18:55:59 +02:00
Antoine Pitrou
b84bc7a7ce Avoid "warning: no newline at end of file" in importlib.h. 2012-05-16 12:58:04 +02:00
Benjamin Peterson
6ecf8ce364 apparently importlib.h wants to be updated 2012-05-14 22:17:34 -07:00
Brett Cannon
c049952de7 Issue #13959: Have
importlib.abc.FileLoader.load_module()/get_filename() and
importlib.machinery.ExtensionFileLoader.load_module() have their
single argument be optional as the loader's constructor has all the
ncessary information.

This allows for the deprecation of
imp.load_source()/load_compile()/load_package().
2012-05-11 14:48:41 -04:00
Brett Cannon
44ec91f6a5 Update importlib.h 2012-05-11 13:11:02 -04:00
Antoine Pitrou
6efa50a384 Issue #14583: Fix importlib bug when a package's __init__.py would first import one of its modules then raise an error. 2012-05-07 21:41:59 +02:00
Brett Cannon
feccc09952 Clean up a docstring. 2012-05-04 16:47:54 -04:00
Brett Cannon
a6685e8d36 update importlib.h 2012-05-04 16:03:20 -04:00
Brett Cannon
2657df4744 Issue #13959: Re-implement imp.get_suffixes() in Lib/imp.py.
This introduces a new function, imp.extension_suffixes(), which is
currently undocumented. That is forthcoming once issue #14657 is
resolved and how to expose file suffixes is decided.
2012-05-04 15:20:40 -04:00
Brett Cannon
efad00d520 Issue #14646: __import__() now sets __loader__ if need be.
importlib.util.module_for_loader also will set __loader__ along with
__package__. This is in conjunction to a forthcoming update to PEP 302
which will make these two attributes required for loaders to set.
2012-04-27 17:27:14 -04:00
Brett Cannon
fea73efc9e Issue #14605: Don't error out if get_importer() returns None. 2012-04-27 15:45:15 -04:00
Brett Cannon
aa93642a35 Issue #14605: Use None in sys.path_importer_cache to represent no
finder instead of using some (now non-existent) implicit finder.
2012-04-27 15:30:58 -04:00
Brett Cannon
ce418b448f Issue #14605: Stop having implicit entries for sys.meta_path.
ImportWarning is raised if sys.meta_path is found to be empty.
2012-04-27 14:01:58 -04:00