summaryrefslogtreecommitdiff
path: root/Lib/importlib
Commit message (Collapse)AuthorAgeFilesLines
* - Issue #22966: Fix __pycache__ pyc file name clobber when pyc_compile isBarry Warsaw2014-12-011-2/+2
|\ | | | | | | | | asked to compile a source file containing multiple dots in the source file name.
| * - Issue #22966: Fix __pycache__ pyc file name clobber when pyc_compile isBarry Warsaw2014-12-011-2/+2
| | | | | | | | | | asked to compile a source file containing multiple dots in the source file name.
* | Issue #19720: Suppressed context for some exceptions in importlib.Serhiy Storchaka2014-11-213-5/+6
| |
* | Issue #22834: Have import suppress FileNotFoundError when the currentBrett Cannon2014-11-211-1/+6
| | | | | | | | | | | | working directory no longer exists. Thanks to Martin Panter for the bug report.
* | Issue #21052: Don't raise ImportWarning for sys.meta_path orBrett Cannon2014-10-101-2/+2
| | | | | | | | | | | | sys.path_hooks when set to None during interpreter shutdown. Thanks to Martin Panter for the initial bug report.
* | Fix a parameter name to make sense againBrett Cannon2014-05-301-2/+3
| |
* | Issue #20383: Introduce importlib.util.module_from_spec().Brett Cannon2014-05-304-221/+166
| | | | | | | | | | | | Along the way, dismantle importlib._bootstrap._SpecMethods as it was no longer relevant and constructing the new function required partially dismantling the class anyway.
* | Merge from 3.4 (for #21226).Eric Snow2014-05-121-0/+23
|\ \ | |/
| * Issue #21226: Set all attrs in PyImport_ExecCodeModuleObject.Eric Snow2014-05-121-0/+23
| |
* | Issue #21156: importlib.abc.InspectLoader.source_to_code() is now aBrett Cannon2014-05-091-1/+2
| | | | | | | | staticmethod.
* | PEP 465: a dedicated infix operator for matrix multiplication (closes #21176)Benjamin Peterson2014-04-091-1/+2
| |
* | Issue #17621: Introduce importlib.util.LazyLoader.Brett Cannon2014-04-041-1/+93
|/
* Issue #20884: Don't assume in importlib.__init__ that __file__ isBrett Cannon2014-03-211-1/+6
| | | | defined.
* Issue #20763: Fix importlib.machinery.PathFinder to supportBrett Cannon2014-02-261-1/+1
| | | | | | PathEntryFinder instances which only define find_module(). Reported by Yukihiro Nakadaira.
* update magic number for #20625Benjamin Peterson2014-02-191-1/+2
|
* Issue 19944: Fix importlib.find_spec() so it imports parents as needed.Eric Snow2014-01-252-37/+81
| | | | The function is also moved to importlib.util.
* Issue 19713: Remove PEP 451-related code that should have been factored out.Eric Snow2014-01-071-24/+4
| | | | | | This code was an artifact of issuing a DeprecationWarning for the lack of loader.exec_module(). However, we have deferred such warnings to later Python versions.
* Issue #19719: Update various finder and loader ABCs such that theirBrett Cannon2014-01-071-6/+26
| | | | | | | old methods now provide implementations when PEP 451 APIs are present. This should help with backwards-compatibility with code which has not been updated to work with PEP 451.
* Issue 19713: Add PEP 451-related deprecations.Eric Snow2014-01-064-36/+127
|
* Remove dead PEP 451 code.Eric Snow2014-01-061-10/+0
|
* Issue #19927: Add __eq__ to path-based loaders in importlib.Eric Snow2014-01-041-0/+14
|
* Issue #20097: Fix bad use of "self" in importlib's WindowsRegistryFinder.Eric Snow2014-01-021-1/+1
|
* Remove some dead code in importlib, introduced with the PEP 451 patch.Eric Snow2013-12-181-8/+3
| | | | | | | Early in the PEP 451 implementation some of the importlib loaders had their own _get_spec() methods to simplify accommodating them. However, later implementations removed the need. They simply failed to remove this code at the same time. :)
* Issue #18864: Add a setter for ModuleSpec.has_location.Eric Snow2013-12-101-0/+4
|
* Issue 19851: Fix a regression in reloading submodules.Eric Snow2013-12-091-4/+11
|
* Issue #19698: Remove exec_module() from the built-in and extensionBrett Cannon2013-11-291-27/+36
| | | | | | | | | | | | | module loaders. Due to the fact that the call signatures for extension modules and built-in modules does not allow for the specifying of what module to initialize and that on Windows all extension modules are built-in modules, work to clean up built-in and extension module initialization will have to wait until Python 3.5. Because of this the semantics of exec_module() would be incorrect, so removing the methods for now is the best option; load_module() is still used as a fallback by importlib and so this won't affect semantics.
* User the repr for a module name in more placesBrett Cannon2013-11-221-6/+6
|
* Remove a commented-out lineBrett Cannon2013-11-221-2/+0
|
* Don't assume trying to find a builtin will succeed (e.g. posix isn't on Windows)Brett Cannon2013-11-221-0/+2
|
* Implement PEP 451 (ModuleSpec).Eric Snow2013-11-225-343/+984
|
* Abstract out stat calls in importlib for easier experimentation.Brett Cannon2013-11-011-5/+15
|
* Issue #19410: Put back in special-casing of '' forBrett Cannon2013-11-011-1/+1
| | | | | | | | | importlib.machinery.FileFinder. While originally moved to stop special-casing '' as PathFinder farther up the typical call chain now uses the cwd in the instance of '', it was deemed an unnecessary risk to breaking subclasses of FileFinder to take the special-casing out.
* Issue #19413: Restore pre-3.3 reload() semantics of re-finding modules.Eric Snow2013-10-312-4/+12
|
* cleanup the construction of __qualname__ (closes #19301 again)Benjamin Peterson2013-10-201-1/+2
|
* give explicitly global functions and classes a global __qualname__ (closes ↵Benjamin Peterson2013-10-191-1/+2
| | | | #19301)
* Issue #18810: Be optimistic with stat calls when seeing if a directoryBrett Cannon2013-10-181-10/+9
| | | | | | | | | | | | | | | | | | | exists when checking for a package. Before there was an isdir check and then various isfile checks for possible __init__ files when looking for a package. This change drops the isdir check by leaning on the assumption that a directory will not contain something named after the module being imported which is not a directory. If the module is a package then it saves a stat call. If there is nothing in the directory with the potential package name it also saves a stat call. Only if there is something in the directory named the same thing as the potential package will the number of stat calls increase (due to more wasteful __init__ checks). Semantically there is no change as the isdir check moved down so that namespace packages continue to have no chance of accidentally collecting non-existent directories.
* Issue #18416: Fix various os calls in importlib.machinery.FileFinderBrett Cannon2013-10-181-2/+2
| | | | now that self.path is no longer forced to '.'.
* Issue #18416: Have importlib.machinery.PathFinder treat '' as the cwdBrett Cannon2013-10-181-2/+2
| | | | | | | | | | | | | | | | | | | and stop importlib.machinery.FileFinder treating '' as '.'. Previous PathFinder transformed '' into '.' which led to __file__ for modules imported from the cwd to always be relative paths. This meant the values of the attribute were wrong as soon as the cwd changed. This change now means that as long as the site module is run (which makes all entries in sys.path absolute) then all values for __file__ will also be absolute unless it's for __main__ when specified by file path in a relative way (modules imported by runpy will have an absolute path). Now that PathFinder is no longer treating '' as '.' it only makes sense for FileFinder to stop doing so as well. Now no transformation is performed for the directory given to the __init__ method. Thanks to Madison May for the initial patch.
* [issue 19152] Ensure we have actually registered ExtensionFileLoader as an ↵Eric Snow2013-10-041-2/+2
| | | | ExecutionLoader.
* [issue19152] Add ExtensionFileLoader.get_filename().Eric Snow2013-10-032-0/+7
|
* [issue19951] Fix docstring and use of _get_suppported_file_loaders() to ↵Eric Snow2013-10-031-2/+2
| | | | reflect 2-tuples.
* Issue #16826: Revert fix while Windows issues are being worked out.Meador Inge2013-09-031-4/+1
|\
| * Issue #16826: Revert fix while Windows issues are being worked out.Meador Inge2013-09-031-4/+1
| |
* | Issue #16826: Don't check for PYTHONCASEOK when using -E.Meador Inge2013-09-031-1/+4
|\ \ | |/ | | | | | | This commit fixes a regression that sneaked into Python 3.3 where importlib was not respecting -E when checking for the PYTHONCASEOK environment variable.
| * Issue #16826: Don't check for PYTHONCASEOK when using -E.Meador Inge2013-09-031-1/+4
| | | | | | | | | | This commit fixes a regression that sneaked into Python 3.3 where importlib was not respecting -E when checking for the PYTHONCASEOK environment variable.
* | Closes issue #18698: ensure importlib.reload() returns the module out of ↵Eric Snow2013-08-141-1/+3
| | | | | | | | sys.modules.
* | Closes issue #18598: Have the exception message forBrett Cannon2013-08-121-1/+3
| | | | | | | | | | importlib.import_module() include the name of the module when the 'package' argument is missing but needed.
* | #18681: merge with 3.3.Ezio Melotti2013-08-101-1/+1
|\ \ | |/
* | Issue #18415: Normalize what type of quotes are used with stringBrett Cannon2013-07-121-30/+30
| | | | | | | | | | | | | | constants in importlib._bootstrap. Along the way clean up from string interpolation to use the repr explicitly. Initial patch by Madison May.
* | merge for issue #18351.Brett Cannon2013-07-061-6/+4
|\ \ | |/