Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Issue #14605: Rename _SourcelessFileLoader to SourcelessFileLoader | Marc-Andre Lemburg | 2012-04-24 | 7 | -8/+8 | |
| | ||||||
* | Issue #14605: Expose importlib.abc.FileLoader and | Brett Cannon | 2012-04-22 | 13 | -88/+137 | |
| | | | | | | | | importlib.machinery.(FileFinder, SourceFileLoader, _SourcelessFileLoader, ExtensionFileLoader). This exposes all of importlib's mechanisms that will become public on the sys module. | |||||
* | Issue #13959: Continue to try to accomodate altsep in importlib by not | Brett Cannon | 2012-04-22 | 1 | -5/+11 | |
| | | | | ignoring altsep if it already exists on a path when doing a join. | |||||
* | Revert to os.path.join() semantics for path manipulation in importlib | Brett Cannon | 2012-04-22 | 1 | -11/+2 | |
| | | | | which is different than what imp.cache_from_source() operates on. | |||||
* | Continue the good fight to get Windows to like importlib by fixing a | Brett Cannon | 2012-04-22 | 1 | -1/+3 | |
| | | | | variable name. | |||||
* | Have importlib look for pre-existing path separators when joining | Brett Cannon | 2012-04-22 | 1 | -2/+10 | |
| | | | | paths. | |||||
* | Don't worry about moving imp.get_tag() over to Lib/imp.py. | Brett Cannon | 2012-04-21 | 1 | -1/+3 | |
| | ||||||
* | Issue #13959: Re-implement imp.source_from_cache() in Lib/imp.py. | Brett Cannon | 2012-04-21 | 1 | -1/+5 | |
| | ||||||
* | Issue #13959: Re-implement imp.cache_from_source() in Lib/imp.py. | Brett Cannon | 2012-04-21 | 1 | -5/+27 | |
| | ||||||
* | Make path manipulation more robust for platforms with alternative path | Brett Cannon | 2012-04-21 | 1 | -16/+27 | |
| | | | | separators. | |||||
* | Issue #13959: Keep imp.get_magic() in C code, but cache in importlib | Brett Cannon | 2012-04-20 | 1 | -4/+8 | |
| | | | | | | 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 #14585: test_import now runs all tests under | Brett Cannon | 2012-04-20 | 1 | -0/+25 | |
| | | | | | importlib.test.import_ using builtins.__import__() instead of just the relative import tests. | |||||
* | Issue #14581: Windows users are allowed to import modules w/o taking | Brett Cannon | 2012-04-20 | 1 | -1/+17 | |
| | | | | | the file suffix's case into account, even when doing a case-sensitive import. | |||||
* | Have importlib.test.regrtest clear sys.path_importer_cache to make | Brett Cannon | 2012-04-20 | 1 | -0/+1 | |
| | | | | sure finders from importlib are used instead of _frozen_importlib. | |||||
* | don't bother keeping a set we'll never use | Benjamin Peterson | 2012-04-18 | 1 | -1/+2 | |
| | ||||||
* | rollback 005fd1fe31ab (see #14609 and #14582) | Benjamin Peterson | 2012-04-18 | 2 | -14/+34 | |
| | | | | | Being able to overload a sys.module entry during import of a module was broken by this changeset. | |||||
* | Issue #12599: Be more strict in accepting None vs. a false-like object | Brett Cannon | 2012-04-18 | 3 | -4/+27 | |
| | | | | | | | in importlib. Thanks to PJE for pointing out the issue and Nick Coghlan for filing the bug. | |||||
* | Issue #14592: A relative import will raise a KeyError if __package__ | Brett Cannon | 2012-04-17 | 1 | -0/+5 | |
| | | | | | | or __name__ are not set in globals. Thanks to Stefan Behnel for the bug report. | |||||
* | Issue #13959: Rename imp to _imp and add Lib/imp.py and begin | Brett Cannon | 2012-04-15 | 1 | -30/+40 | |
| | | | | | | | 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. | |||||
* | merge | Brett Cannon | 2012-04-15 | 1 | -2/+2 | |
|\ | ||||||
| * | utilize startswith(tuple) | Philip Jenvey | 2012-04-15 | 1 | -2/+2 | |
| | | ||||||
* | | Issue #14582: Import returns the module returned by a loader instead | Brett Cannon | 2012-04-15 | 2 | -34/+14 | |
|/ | | | | | | | | | | | | of sys.modules when possible. This is being done for two reasons. One is to gain a little bit of performance by skipping an unnecessary dict lookup in sys.modules. But the other (and main) reason is to be a little bit more clear in how things should work from the perspective of import's interactions with loaders. Otherwise loaders can easily forget to return the module even though PEP 302 explicitly states they are expected to return the module they loaded. | |||||
* | Handle importing pkg.mod by executing | Brett Cannon | 2012-04-15 | 2 | -1/+10 | |
| | | | | | __import__('mod', {'__packaging__': 'pkg', level=1) w/o properly (and thus not segfaulting). | |||||
* | Add some comments. | Brett Cannon | 2012-04-14 | 1 | -0/+2 | |
| | ||||||
* | Issue #2377: Make importlib the implementation of __import__(). | Brett Cannon | 2012-04-14 | 9 | -28/+40 | |
| | | | | | | | importlib._bootstrap is now frozen into Python/importlib.h and stored as _frozen_importlib in sys.modules. Py_Initialize() loads the frozen code along with sys and imp and then uses _frozen_importlib._install() to set builtins.__import__() w/ _frozen_importlib.__import__(). | |||||
* | Have importlib take advantage of ImportError's new 'name' and 'path' | Brett Cannon | 2012-04-13 | 9 | -41/+76 | |
| | | | | attributes. | |||||
* | Issue #14500: Fix importlib.test.import_.test_packages to clean up | Brett Cannon | 2012-04-06 | 1 | -1/+5 | |
| | | | | after itself properly. | |||||
* | If a module injects something into sys.modules as a side-effect of | Brett Cannon | 2012-04-03 | 2 | -0/+16 | |
| | | | | | | | | importation, then respect that injection. Discovered thanks to Lib/xml/parsers/expat.py injecting xml.parsers.expat.errors and etree now importing that directly as a module. | |||||
* | Remove a dead docstring. | Brett Cannon | 2012-03-02 | 1 | -6/+0 | |
| | ||||||
* | Update importlib.invalidate_caches() to be more general. | Brett Cannon | 2012-02-27 | 4 | -35/+50 | |
| | ||||||
* | unused imports, pep8 | Philip Jenvey | 2012-02-25 | 2 | -12/+12 | |
| | ||||||
* | Simplify importib._resolve_name(). | Brett Cannon | 2012-02-24 | 1 | -11/+5 | |
| | ||||||
* | Turn _return_module() into _handle_fromlist(). | Brett Cannon | 2012-02-24 | 1 | -25/+25 | |
| | ||||||
* | Make the benchmark recording more sensible for importlib.test.benchmark. | Brett Cannon | 2012-02-24 | 1 | -29/+27 | |
| | ||||||
* | Improper type for __package__ should raise TypeError, not ValueError. | Brett Cannon | 2012-02-23 | 2 | -2/+2 | |
| | ||||||
* | Do a type check instead of an interface check. | Brett Cannon | 2012-02-23 | 1 | -2/+2 | |
| | ||||||
* | Refactor importlib to make it easier to re-implement in C. | Brett Cannon | 2012-02-22 | 1 | -45/+31 | |
| | ||||||
* | Issue #14077: importlib: Fix regression introduced by de6703671386. | Charles-François Natali | 2012-02-22 | 1 | -3/+6 | |
| | ||||||
* | Issue #14063: fix test_importlib failure under OS X case-insensitive filesystems | Antoine Pitrou | 2012-02-20 | 1 | -11/+15 | |
| | | | | (regression) | |||||
* | put docstrings on functions | Benjamin Peterson | 2012-02-20 | 1 | -2/+2 | |
| | ||||||
* | _relax_case -> _make_relax_case | Antoine Pitrou | 2012-02-20 | 1 | -3/+4 | |
| | ||||||
* | Issue #14043: Speed up importlib's _FileFinder by at least 8x, and add a new ↵ | Antoine Pitrou | 2012-02-20 | 3 | -50/+69 | |
| | | | | | | importlib.invalidate_caches() function. importlib is now often faster than imp.find_module() at finding modules. | |||||
* | Fix a failing importlib test under Windows. | Brett Cannon | 2012-02-20 | 1 | -1/+2 | |
| | | | | Closes issue #14054. | |||||
* | Fix importlib.test.__main__ to only worry about command-line flags when ↵ | Brett Cannon | 2012-02-17 | 1 | -8/+9 | |
| | | | | directly executed. | |||||
* | Optimize importlib's case-sensitivity check by wasting as little time as ↵ | Brett Cannon | 2012-02-17 | 1 | -13/+23 | |
| | | | | possible under case-sensitive OSs. | |||||
* | Have importlib.test use argparse instead of some hacked up solution. | Brett Cannon | 2012-02-17 | 1 | -3/+8 | |
| | ||||||
* | Have importlib use os.replace() for atomic renaming. | Brett Cannon | 2012-02-17 | 1 | -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 Cannon | 2012-02-16 | 2 | -2/+4 | |
| | | | | | | | 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 Cannon | 2012-02-16 | 2 | -0/+9 | |
| | | | | | 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 using | Brett Cannon | 2012-02-16 | 1 | -71/+130 | |
| | | | | | an __import__ implementation that takes care of basics in C and punts to importlib for more complicated code. |