| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
trying to load an extension module.
While at it, also add a proper unittest.skipIf() guard to another test
involving imp.load_dynamic().
|
|
|
|
|
|
|
|
|
|
|
|
| |
modules which will typically work when reloaded.
A hack is used to support these functions as their API allowed them to
pass in a file object but then operate as if import had loaded them.
Unfortunately the hack kept a reference around for the file object
passed in which would be unusable on reload since it had been closed.
The solution is to simply use the hack for the initial load but then a
proper loader on the module so that imp.reload() at least has a chance
to work.
|
|
|
|
|
|
|
| |
does not support dynamic loading (e.g. Atari), so make sure that imp
doesn't assume it always exists.
Patch by Christian Heimes.
|
| |
|
|
|
|
|
| |
module again. Also took the opportunity to stop accidentally exporting
_imp.extension_suffixes() as public.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Lib/imp.py.
|
|
|
|
|
|
| |
NotimplementedError when sys.implementation.cache_tag is None.
Thanks to Pranav Ravichandran for taking an initial stab at the patch.
|
|
|
|
|
|
| |
importlib._bootstrap in imp to fix a grammatical mistake.
Thanks to Marc Abramowitz for the patch.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
that they are deprecated (previous commit documented this fact in the
module docs).
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
Thanks to Eric Snow for the patch.
|
| |
|
|
|
|
|
| |
This time also recreating the Python/importlib.h file to make
make happy. See the ticket for details.
|
|
|
|
| |
the buildbots to fail.
|
| |
|
|
|
|
|
|
|
|
| |
importlib.machinery.(FileFinder, SourceFileLoader,
_SourcelessFileLoader, ExtensionFileLoader).
This exposes all of importlib's mechanisms that will become public on
the sys module.
|
| |
|
|
|
|
| |
Thanks to Eric Snow for taking an initial stab at the implementation.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
for performance. While get_magic() could move to Lib/imp.py, having to
support PyImport_GetMagicNumber() would lead to equal, if not more, C
code than sticking with the status quo.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Thanks to Eric Snow for helping with imp.load_module() (previous
commit) which led to the removal of a bunch of C code.
|
| |
|
| |
|
|
rewriting functionality in pure Python.
To start, imp.new_module() has been rewritten in pure Python, put into
importlib (privately) and then publicly exposed in imp.
|