Philip Jenvey
688a551ca0
fix docstring wording
14 years ago
Brett Cannon
f410ce8c09
Issue #15502 : Refactor some code.
14 years ago
Philip Jenvey
731d48a65f
update docstring per the extension package fix, refactor
14 years ago
Brett Cannon
ac9f2f3de3
Issue #15576 : Allow extension modules to be a package's __init__
module again. Also took the opportunity to stop accidentally exporting
_imp.extension_suffixes() as public.
14 years ago
Brett Cannon
f4dc9204cc
Issue #15502 : Finish bringing importlib.abc in line with the current
state of the import system. Also make importlib.invalidate_caches()
work with sys.meta_path instead of sys.path_importer_cache to
completely separate the path-based import system from the overall
import system.
Patch by Eric Snow.
14 years ago
Brett Cannon
cb4996afe4
Issue #15471 : Don't use mutable object as default values for the
parameters of importlib.__import__().
14 years ago
Nick Coghlan
4941774f59
Issue #15502 : Bring the importlib.PathFinder docs and docstring more in line with the new import system documentation, and fix various parts of the new docs that weren't quite right given PEP 420 or were otherwise a bit misleading. Also note the key terminology problem still being discussed in the issue
14 years ago
Nick Coghlan
ff79486bb5
Close #15519 : Properly expose WindowsRegistryFinder in importlib and bring the name into line with normal import terminology. Original patch by Eric Snow
14 years ago
Nick Coghlan
42c0766a53
Close #15486 : Simplify the mechanism used to remove importlib frames from tracebacks when they just introduce irrelevant noise
14 years ago
Nick Coghlan
5ee9892406
Close #15425 : Eliminate more importlib related traceback noise
14 years ago
Martin v. Löwis
e3010a8d12
Issue #14578 : Support modules registered in the Windows registry again.
Patch by Amaury Forgeot d'Arc.
14 years ago
Martin v. Löwis
7e39572aa8
Issue #15466 : Stop using TYPE_INT64 in marshal,
to make importlib.h (and other byte code files) equal between 32-bit
and 64-bit systems.
14 years ago
Nick Coghlan
2824cb507d
Issue #15343 : A lot more than just unicode decoding can go wrong when retrieving a source file
14 years ago
Brett Cannon
a6473f9cfd
Issues #15169 , #14599 : Make PyImport_ExecCodeModuleWithPathnames() use
Lib/imp.py for imp.source_from_cache() instead of its own C version.
Also change PyImport_ExecCodeModuleObject() to not infer the source
path from the bytecode path like
PyImport_ExecCodeModuleWithPathnames() does. This makes the function
less magical.
This also has the side-effect of removing all uses of MAXPATHLEN in
Python/import.c which can cause failures on really long filenames.
14 years ago
Brett Cannon
461c813164
Issue #15111 : When a module was imported using a 'from import'
statement (e.g. ``from distutils import msvc9compiler``) that triggers
an ImportError of its own (e.g. the non-existence of winreg), let that
exception propagate instead of raising a generic ImportError for the
module being requested (e.g. msvc9compiler).
14 years ago
Brett Cannon
77b2abd094
Issue #15167 (as part of #13959 ): imp.get_magic() is no implemented in
Lib/imp.py.
14 years ago
Brett Cannon
19a2f5961c
Issue #15056 : imp.cache_from_source() and source_from_cache() raise
NotimplementedError when sys.implementation.cache_tag is None.
Thanks to Pranav Ravichandran for taking an initial stab at the patch.
14 years ago
Amaury Forgeot d'Arc
ae7b8f07c1
Issue #15110 : Also hide importlib frames when importing a builtin module fails.
14 years ago
Antoine Pitrou
bc07a5c913
Issue #15110 : Fix the tracebacks generated by "import xxx" to not show the importlib stack frames.
14 years ago
Antoine Pitrou
bc1a7ddc9b
Check-in compiled importlib changes (you must run "make" after modifying the importlib sources).
14 years ago
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.
14 years ago
Antoine Pitrou
0ab5cf9b46
Issue #15181 : importlib bytecode is unsigned and shouldn't have negative numbers.
This fixes a compiler warning with suncc.
14 years ago
Eric V. Smith
e51a36922f
Fixes issue 15039: namespace packages are no longer imported in preference to modules of the same name.
14 years ago
Antoine Pitrou
310f95b04d
A better repr() for FileFinder
14 years ago
Antoine Pitrou
e67f48ce5e
Issue #14928 : Fix importlib bootstrap issues by using a custom executable (Modules/_freeze_importlib) to build Python/importlib.h.
14 years ago
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.
14 years ago
Antoine Pitrou
2d9db1dfce
Try to fix issue #15086 : build failure on Ubuntu shared buildbot.
14 years ago
Brett Cannon
99d776fdf4
Update importlib.h by touching Lib/importlib/_bootstrap.py.
14 years ago
Nick Coghlan
5c6eba3a93
Tweak importlib._bootstrap to avoid zero-argument super so I can work on issue #14857 without breaking imports
14 years ago
Brett Cannon
d785cb3955
Remove some redundant decorators.
14 years ago
Eric V. Smith
984b11f88f
issue 14660: Implement PEP 420, namespace packages.
14 years ago
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.
14 years ago
Antoine Pitrou
b84bc7a7ce
Avoid "warning: no newline at end of file" in importlib.h.
14 years ago
Benjamin Peterson
6ecf8ce364
apparently importlib.h wants to be updated
14 years ago
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().
14 years ago
Brett Cannon
44ec91f6a5
Update importlib.h
14 years ago
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.
14 years ago
Brett Cannon
feccc09952
Clean up a docstring.
14 years ago
Brett Cannon
a6685e8d36
update importlib.h
14 years ago
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.
14 years ago
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.
14 years ago
Brett Cannon
fea73efc9e
Issue #14605 : Don't error out if get_importer() returns None.
14 years ago
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.
14 years ago
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.
14 years ago
Brett Cannon
e0d88a173c
Issue #14605 : Make explicit the entries on sys.path_hooks that used to
be implicit.
Added a warning for when sys.path_hooks is found to be empty. Also
changed the meaning of None in sys.path_importer_cache to represent
trying sys.path_hooks again (an interpretation of previous semantics).
Also added a warning for when None was found.
The long-term goal is for None in sys.path_importer_cache to represent
the same as imp.NullImporter: no finder found for that sys.path entry.
14 years ago
Brett Cannon
f96bb2f9af
Update importlib.h
14 years ago
Marc-Andre Lemburg
7541c8ea37
Issue #14605 and #14642 :
Issue a warning in case Python\importlib.h needs to be rebuilt,
but there's no Python interpreter around to freeze the bootstrap
script.
14 years ago
Marc-Andre Lemburg
4fe29c9657
Issue #14605 : Rename _SourcelessFileLoader to SourcelessFileLoader.
This time also recreating the Python/importlib.h file to make
make happy. See the ticket for details.
14 years ago
Brett Cannon
938d44d59c
Issue #14605 : Expose importlib.abc.FileLoader and
importlib.machinery.(FileFinder, SourceFileLoader,
_SourcelessFileLoader, ExtensionFileLoader).
This exposes all of importlib's mechanisms that will become public on
the sys module.
14 years ago
Brett Cannon
5c903e6ee1
Issue #13959 : Continue to try to accomodate altsep in importlib by not
ignoring altsep if it already exists on a path when doing a join.
14 years ago