| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
(actually, any non-string or non-bytes type).
|
| |
|
| |
|
|
|
|
|
|
| |
files.
This fixes a regression introduced by 3.3. Patch by Charles-François Natali.
|
|
|
|
|
| |
fromlist which causes its own ImportError (e.g. the module tries to
import a non-existent module) should have that exception propagate.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fromlist of __import__ propagate.
The problem previously was that if something listed in fromlist didn't
exist then that's okay. The fix for that was too broad in terms of
catching ImportError.
The trick with the solution to this issue is that the proper
refactoring of import thanks to importlib doesn't allow for a way to
distinguish (portably) between an ImportError because finders couldn't
find a loader, or a loader raised the exception. In Python 3.4 the
hope is to introduce a new exception (e.g. ModuleNotFound) to make it
clean to differentiate why ImportError was raised.
|
|
|
|
|
| |
of source path to set_data() and make the new argument private until
possible API changes can be discussed more thoroughly in Python 3.4.
|
|
|
|
| |
file to the cached bytecode file. Test by Eric Snow.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
When the fromlist argument is specified for __import__() and the
attribute doesn't already exist, an import is attempted. If that fails
(e.g. module doesn't exist), the ImportError will now be silenced (for
backwards-compatibility). This *does not* affect
``from ... import ...`` statements.
Thanks to Eric Snow for the patch and Simon Feltman for reporting the
regression.
|
|
|
|
| |
set.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
module again. Also took the opportunity to stop accidentally exporting
_imp.extension_suffixes() as public.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
parameters of importlib.__import__().
|
|
|
|
| |
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
|
|
|
|
| |
the name into line with normal import terminology. Original patch by Eric Snow
|
|
|
|
| |
tracebacks when they just introduce irrelevant noise
|
| |
|
|
|
|
| |
Patch by Amaury Forgeot d'Arc.
|
|
|
|
| |
retrieving a source file
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
Lib/imp.py.
|
|
|
|
|
|
| |
NotimplementedError when sys.implementation.cache_tag is None.
Thanks to Pranav Ravichandran for taking an initial stab at the patch.
|
| |
|
| |
|
|
|
|
| |
importlib stack frames.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
to modules of the same name.
|
| |
|
|
|
|
|
|
|
|
|
| |
module name into consideration when determining whether a module is a
package or not. This prevents importing a module's __init__ module
directly and having it considered a package, which can lead to
duplicate sub-modules.
Thanks to Ronan Lamy for reporting the bug.
|
|
|
|
| |
issue #14857 without breaking imports
|
| |
|
| |
|
|
|
|
|
| |
Most of the import sequence now uses per-module locks rather than the
global import lock, eliminating well-known issues with threads and imports.
|
|
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
|
|
|
|
|
| |
importlib.machinery that provide the suffix details for import.
The attributes were not put on imp so as to compartmentalize
everything importlib needs for setting up imports in
importlib.machinery.
This also led to an indirect deprecation of inspect.getmoduleinfo() as
it directly returned imp.get_suffix's returned tuple which no longer
makes sense.
|
|
|
|
| |
import one of its modules then raise an error.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|