summaryrefslogtreecommitdiffstats
path: root/Lib/imp.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #15576: Allow extension modules to be a package's __init__Brett Cannon2012-08-101-2/+2
| | | | | module again. Also took the opportunity to stop accidentally exporting _imp.extension_suffixes() as public.
* Issues #15169, #14599: Make PyImport_ExecCodeModuleWithPathnames() useBrett Cannon2012-07-131-24/+1
| | | | | | | | | | | | 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.
* Issue #15167 (as part of #13959): imp.get_magic() is no implemented inBrett Cannon2012-07-091-2/+7
| | | | Lib/imp.py.
* Issue #15056: imp.cache_from_source() and source_from_cache() raiseBrett Cannon2012-07-091-1/+4
| | | | | | NotimplementedError when sys.implementation.cache_tag is None. Thanks to Pranav Ravichandran for taking an initial stab at the patch.
* Issue #15256: Re-use the ImportError exception message as defined byBrett Cannon2012-07-091-1/+1
| | | | | | importlib._bootstrap in imp to fix a grammatical mistake. Thanks to Marc Abramowitz for the patch.
* Issue #15166: Re-implement imp.get_tag() using sys.implementation.Brett Cannon2012-07-021-1/+6
| | | | | | | 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.
* Issue #13959: Add to imp.find_module() and load_module's docstringsBrett Cannon2012-06-151-4/+6
| | | | | that they are deprecated (previous commit documented this fact in the module docs).
* Issue #13959: HaveBrett Cannon2012-05-111-24/+36
| | | | | | | | | | 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().
* Issue #13959: Deprecate imp.get_suffixes() for new attributes onBrett Cannon2012-05-111-13/+20
| | | | | | | | | | | 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.
* don't append the bytecode suffix to the source suffixes globalBenjamin Peterson2012-05-051-2/+1
|
* Issue #13959: Re-implement imp.get_suffixes() in Lib/imp.py.Brett Cannon2012-05-041-5/+11
| | | | | | 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.
* Properly mark names in importlib._bootstrap as private.Brett Cannon2012-05-041-6/+6
|
* Re-indent.Brett Cannon2012-04-291-1/+0
|
* Issues #13959, 14647: Re-implement imp.reload() in Lib/imp.py.Brett Cannon2012-04-291-1/+32
| | | | Thanks to Eric Snow for the patch.
* Issue #13959: Re-implement imp.NullImporter in Lib/imp.py.Brett Cannon2012-04-291-2/+15
|
* Issue #14605: Rename _SourcelessFileLoader to SourcelessFileLoader.Marc-Andre Lemburg2012-04-251-1/+1
| | | | | This time also recreating the Python/importlib.h file to make make happy. See the ticket for details.
* Issue #14605: Revert renaming of _SourcelessFileLoader, since it causedMarc-Andre Lemburg2012-04-251-1/+1
| | | | the buildbots to fail.
* Issue #14605: Rename _SourcelessFileLoader to SourcelessFileLoaderMarc-Andre Lemburg2012-04-241-1/+1
|
* Issue #14605: Expose importlib.abc.FileLoader andBrett Cannon2012-04-221-3/+3
| | | | | | | | importlib.machinery.(FileFinder, SourceFileLoader, _SourcelessFileLoader, ExtensionFileLoader). This exposes all of importlib's mechanisms that will become public on the sys module.
* Fix whitespace.Brett Cannon2012-04-221-1/+0
|
* Issue #13959: Re-implement imp.find_module() in Lib/imp.py.Brett Cannon2012-04-221-4/+68
| | | | Thanks to Eric Snow for taking an initial stab at the implementation.
* Don't worry about moving imp.get_tag() over to Lib/imp.py.Brett Cannon2012-04-211-2/+2
|
* Issue #13959: Re-implement imp.source_from_cache() in Lib/imp.py.Brett Cannon2012-04-211-1/+25
|
* Issue #13959: Re-implement imp.cache_from_source() in Lib/imp.py.Brett Cannon2012-04-211-3/+3
|
* Issue #13959: Keep imp.get_magic() in C code, but cache in importlibBrett Cannon2012-04-201-1/+3
| | | | | | 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.
* Issue #13959: Re-implement imp.load_compiled() in imp.py.Brett Cannon2012-04-171-5/+20
|
* Properly guard against special-casing.Brett Cannon2012-04-171-1/+1
|
* Issue #13959: Re-implement imp.load_source() in imp.py.Brett Cannon2012-04-171-1/+28
|
* Issue #13959: Fix a logic bug.Brett Cannon2012-04-171-1/+1
|
* Issue #13959: Re-implement imp.load_package() in imp.py.Brett Cannon2012-04-161-2/+17
| | | | | Thanks to Eric Snow for helping with imp.load_module() (previous commit) which led to the removal of a bunch of C code.
* Issue #13959: Re-implement imp.load_module() in imp.py.Brett Cannon2012-04-161-1/+28
|
* Consider load_dynamic() something to keep in _imp.Brett Cannon2012-04-151-3/+4
|
* Issue #13959: Rename imp to _imp and add Lib/imp.py and beginBrett Cannon2012-04-151-0/+22
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.