summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/_bootstrap.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove a dead docstring.Brett Cannon2012-03-021-6/+0
|
* Update importlib.invalidate_caches() to be more general.Brett Cannon2012-02-271-14/+5
|
* unused imports, pep8Philip Jenvey2012-02-251-6/+8
|
* Simplify importib._resolve_name().Brett Cannon2012-02-241-11/+5
|
* Turn _return_module() into _handle_fromlist().Brett Cannon2012-02-241-25/+25
|
* Improper type for __package__ should raise TypeError, not ValueError.Brett Cannon2012-02-231-1/+1
|
* Do a type check instead of an interface check.Brett Cannon2012-02-231-2/+2
|
* Refactor importlib to make it easier to re-implement in C.Brett Cannon2012-02-221-45/+31
|
* Issue #14077: importlib: Fix regression introduced by de6703671386.Charles-François Natali2012-02-221-3/+6
|
* Issue #14063: fix test_importlib failure under OS X case-insensitive filesystemsAntoine Pitrou2012-02-201-11/+15
| | | | (regression)
* put docstrings on functionsBenjamin Peterson2012-02-201-2/+2
|
* _relax_case -> _make_relax_caseAntoine Pitrou2012-02-201-3/+4
|
* Issue #14043: Speed up importlib's _FileFinder by at least 8x, and add a new ↵Antoine Pitrou2012-02-201-46/+65
| | | | | | importlib.invalidate_caches() function. importlib is now often faster than imp.find_module() at finding modules.
* Fix a failing importlib test under Windows.Brett Cannon2012-02-201-1/+2
| | | | Closes issue #14054.
* Optimize importlib's case-sensitivity check by wasting as little time as ↵Brett Cannon2012-02-171-13/+23
| | | | possible under case-sensitive OSs.
* Have importlib use os.replace() for atomic renaming.Brett Cannon2012-02-171-17/+6
| | | | Closes issue #13961. Thanks to Charles-François Natali for the patch.
* Tweak the handling of the empty string in sys.path for importlib.Brett Cannon2012-02-161-1/+3
| | | | | | | It seems better to cache the finder for the cwd under its full path insetad of '' in case the cwd changes. Otherwise FileFinder needs to dynamically change itself based on whether it is given '' instead of caching a finder for every change to the cwd.
* importlib.__import__() now raises ValueError when level < 0.Brett Cannon2012-02-161-0/+2
| | | | | This is to bring it more in line with what PEP 328 set out to do with removing ambiguous absolute/relative import semantics.
* Refactor importlib.__import__() and _gcd_import() to facilitate usingBrett Cannon2012-02-161-71/+130
| | | | | an __import__ implementation that takes care of basics in C and punts to importlib for more complicated code.
* Bring importlib in line w/ changes made in my personal bootstrap branch in ↵Brett Cannon2012-02-141-1/+15
| | | | the sandbox.
* simplifyPhilip Jenvey2012-02-101-4/+1
|
* Undo a bad mq management thingy.Brett Cannon2012-02-091-44/+0
|
* Whitespace normalization.Brett Cannon2012-02-081-1/+0
|
* Use the cwd when the empty string is found in sys.path. This leads toBrett Cannon2012-02-081-1/+45
| | | | | __file__ being an absolute path when the module is found in the current directory.
* Move setup code from importlib.__init__ toBrett Cannon2012-02-081-0/+44
| | | | importlib._bootstrap._setup().
* Don't fail in the face of a lacking attribute when wrapping aBrett Cannon2012-02-081-1/+2
| | | | function.
* Relocate importlib._case_ok to importlib._bootstrap.Brett Cannon2012-01-271-0/+27
| | | | | | | This required updating the code to use posix instead of os. This is all being done to make bootstrapping easier to removing dependencies that are kept in importlib.__init__ and thus outside of the single file to bootstrap from.
* Move some code from importlib.__init__ to importlib._bootstrap thatBrett Cannon2012-01-251-4/+35
| | | | does not need to be exposed from C code for bootstrapping reasons.
* Issue #13588: Rename decorators in importlib.Brett Cannon2012-01-161-18/+18
| | | | | More descriptive names are now used in order to make tracebacks more readable.
* Issue #13645: pyc files now contain the size of the corresponding sourceAntoine Pitrou2012-01-131-15/+42
| | | | | code, to avoid timestamp collisions (especially on filesystems with a low timestamp resolution) when checking for freshness of the bytecode.
* Issue #13593: updating the importlib utility decorators for __qualname__.Meador Inge2011-12-151-1/+1
|
* Issue #13591: import_module potentially imports a module twice.Meador Inge2011-12-151-1/+3
|\
| * Issue #13591: import_module potentially imports a module twice.Meador Inge2011-12-151-1/+3
| |
* | Issue #13392: Writing a pyc file should now be atomic under Windows as well.Antoine Pitrou2011-11-151-15/+20
| |
* | Issue #13303: Fix bytecode file default permission.Charles-François Natali2011-11-101-1/+1
| |
* | Issue #13303: Fix a race condition in the bytecode file creation.Charles-François Natali2011-10-311-3/+4
| |
* | Simplify and remove few dependencies on 'errno', thanks to PEP 3151.Florent Xicluna2011-10-281-11/+5
| |
* | Silence the FileExistsError which can be raised because of the O_EXCL flagAntoine Pitrou2011-10-191-7/+7
| | | | | | | | (as in import.c)
* | Issue #13146: Writing a pyc file is now atomic under POSIX.Antoine Pitrou2011-10-171-3/+23
| |
* | Make importlib compatible with __import__ by "fixing" code.co_filenameBrett Cannon2011-03-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | paths. __import__ does a little trick when importing from bytecode by back-patching the co_filename paths to point to the file location where the code object was loaded from, *not* where the code object was originally created. This allows co_filename to point to a valid path. Problem is that co_filename is immutable from Python, so a private function -- imp._fix_co_filename() -- had to be introduced in order to get things working properly. Originally the plan was to add a file argument to marshal.loads(), but that failed as the algorithm used by __import__ is not fully recursive as one might expect, so to be fully backwards-compatible the code used by __import__ needed to be exposed. This closes issue #6811 by taking a different approach than outlined in the issue.
* | Have importlib use the repr of a module name in error messages.Brett Cannon2011-03-231-1/+1
| | | | | | | | | | | | | | This makes it obvious that an import failed because of some extraneous whitespace (e.g., a newline). This is a partial fix for issue #8754.
* | #11515: Merge with 3.2.Ezio Melotti2011-03-151-2/+2
|\ \ | |/
| * #11515: Merge with 3.1.Ezio Melotti2011-03-151-2/+2
| |\
| | * #11515: fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-151-1/+1
| | |
| | * Merged revisions 78242 via svnmerge fromBrett Cannon2010-02-191-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r78242 | brett.cannon | 2010-02-19 11:01:06 -0500 (Fri, 19 Feb 2010) | 5 lines Importlib was not matching import's handling of .pyc files where it had less then 8 bytes total in the file. Fixes issues 7361 & 7875. ........
| | * Merged revisions 76146 via svnmerge fromBrett Cannon2009-11-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r76146 | brett.cannon | 2009-11-07 15:55:05 -0800 (Sat, 07 Nov 2009) | 6 lines When trying to write new bytecode, importlib was not catching the IOError thrown if the file happened to be read-only to keep the failure silent. Fixes issue #7187. Thanks, Dave Malcolm for the report and analysis of the problem. ........
| | * Merged revisions 74584 via svnmerge fromBrett Cannon2009-08-301-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r74584 | brett.cannon | 2009-08-29 20:47:36 -0700 (Sat, 29 Aug 2009) | 3 lines Have importlib raise ImportError if None is found in sys.modules. This matches current import semantics. ........
* | | Skip test if zlib not present. Closes #11498. Patch by Natalia B. Bidart.Eric V. Smith2011-03-141-1/+1
| | |
* | | Typos.Eric V. Smith2011-03-141-2/+2
|/ /
* | Issue 10899: Remove function type annotations from the stdlibRaymond Hettinger2011-01-131-3/+3
| |