summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Close #14648: Compute correctly maxchar in str.format() for substrinVictor Stinner2012-04-231-4/+2
|
* Implement PEP 412: Key-sharing dictionaries (closes #13903)Benjamin Peterson2012-04-231-57/+18
| | | | Patch from Mark Shannon.
* inherit maxchar of field value where needed (closes #14648)Benjamin Peterson2012-04-231-0/+3
|
* Issue #14605: Expose importlib.abc.FileLoader andBrett Cannon2012-04-221-2971/+2904
| | | | | | | | 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 notBrett Cannon2012-04-221-2966/+2977
| | | | ignoring altsep if it already exists on a path when doing a join.
* Revert to os.path.join() semantics for path manipulation in importlibBrett Cannon2012-04-221-2974/+2964
| | | | which is different than what imp.cache_from_source() operates on.
* Update importlib.hBrett Cannon2012-04-221-2967/+2967
|
* Have importlib look for pre-existing path separators when joiningBrett Cannon2012-04-221-2977/+2981
| | | | paths.
* Issue #13959: Re-implement imp.find_module() in Lib/imp.py.Brett Cannon2012-04-221-751/+0
| | | | 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-3061/+3064
|
* Issue #13959: Re-implement imp.source_from_cache() in Lib/imp.py.Brett Cannon2012-04-212-3167/+3140
|
* Issue #13959: Re-implement imp.cache_from_source() in Lib/imp.py.Brett Cannon2012-04-212-2991/+2955
|
* Make path manipulation more robust for platforms with alternative pathBrett Cannon2012-04-211-3014/+3047
| | | | separators.
* Issue #13959: Keep imp.get_magic() in C code, but cache in importlibBrett Cannon2012-04-201-1498/+1503
| | | | | | 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 #14599: Support ImportError.path on AIX and HPUX when loadingBrett Cannon2012-04-202-2/+18
| | | | extension modules.
* Issue #14599: Generalize a test for ImportError.path and add supportBrett Cannon2012-04-202-5/+15
| | | | | | | in Python/dynload_shlibs.c. This should fix the remaining importlib test failure on Windows. Support in AIX and HP-UX will be in a separate checkin.
* Issue #14581: Windows users are allowed to import modules w/o takingBrett Cannon2012-04-201-898/+916
| | | | | the file suffix's case into account, even when doing a case-sensitive import.
* Issue #14127: Add st_{cma}time_ns fields to os.stat() result object.Larry Hastings2012-04-191-0/+11
|
* Fix refleak: PyObject_GetItem returns a new reference, not a borrowed one ↵Antoine Pitrou2012-04-191-3/+3
| | | | like PyDict_GetItem.
* Issue #14098: New functions PyErr_GetExcInfo and PyErr_SetExcInfo.Martin v. Löwis2012-04-191-0/+33
| | | | Patch by Stefan Behnel.
* Issue #14385: Support other types than dict for __builtins__Victor Stinner2012-04-181-48/+94
| | | | | | It is now possible to use a custom type for the __builtins__ namespace, instead of a dict. It can be used for sandboxing for example. Raise also a NameError instead of ImportError if __build_class__ name if not found in __builtins__.
* update importlib...Benjamin Peterson2012-04-181-885/+891
|
* Merge headsAntoine Pitrou2012-04-182-480/+469
|\
| * rollback 005fd1fe31ab (see #14609 and #14582)Benjamin Peterson2012-04-182-480/+469
| | | | | | | | | | Being able to overload a sys.module entry during import of a module was broken by this changeset.
* | Fix it for good :-)Antoine Pitrou2012-04-181-3/+1
|/
* fix refcnt/style/debuging oversightsBenjamin Peterson2012-04-181-5/+7
|
* Fix email post-commit review comments.Brian Curtin2012-04-181-8/+11
| | | | | | Add INCREFs, fix args->kwargs, and a second args==NULL check was removed, left over from a merger with another function. Instead, checking msg==NULL does what that used to do in a roundabout way.
* MergeBrett Cannon2012-04-181-1/+5
|\
| * merge 3.2 (#14607)Benjamin Peterson2012-04-171-1/+5
| |\
| | * mangle keyword-only argname when loading defaults (closes #14607)Benjamin Peterson2012-04-171-1/+5
| | |
* | | Issue #12599: Be more strict in accepting None vs. a false-like objectBrett Cannon2012-04-181-1201/+1202
|/ / | | | | | | | | | | | | in importlib. Thanks to PJE for pointing out the issue and Nick Coghlan for filing the bug.
* | Issue #13959: Re-implement imp.load_compiled() in imp.py.Brett Cannon2012-04-171-76/+0
| |
* | Issue #14592: A relative import will raise a KeyError if __package__Brett Cannon2012-04-171-1/+2
| | | | | | | | | | | | or __name__ are not set in globals. Thanks to Stefan Behnel for the bug report.
* | Fix #14600. Correct reference handling and naming of ImportError convenience ↵Brian Curtin2012-04-173-31/+25
| | | | | | | | function
* | Issue #13959: Re-implement imp.load_source() in imp.py.Brett Cannon2012-04-171-390/+0
| |
* | Fix another refleakAntoine Pitrou2012-04-161-3/+7
| |
* | Fix a refleakAntoine Pitrou2012-04-161-2/+3
| |
* | Fix reference loss on Py_None when None is encountered in sys.modules.Antoine Pitrou2012-04-161-0/+1
| |
* | Avoid compiler warning due to stray \x00Antoine Pitrou2012-04-162-3/+3
| |
* | Fix #10854. Make use of the new path and name attributes on ImportErrorBrian Curtin2012-04-161-2/+3
| | | | | | | | for extension modules on Windows.
* | Issue #13959: Re-implement imp.load_package() in imp.py.Brett Cannon2012-04-161-171/+0
| | | | | | | | | | 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-53/+0
| |
* | Try to get hg to treat importlib.h as binary.Brett Cannon2012-04-152-0/+2
| |
* | Issue #13959: Simplify imp.reload() by relying on a module'sBrett Cannon2012-04-151-34/+10
| | | | | | | | | | | | | | | | | | | | __loader__. Since import now sets __loader__ on all modules it creates and imp.reload() already relied on the attribute for modules that import didn't create, the only potential compatibility issue is if people were deleting the attribute on modules and expecting imp.reload() to continue to work.
* | Update importlib.hBrett Cannon2012-04-151-2616/+2616
| |
* | Issue #13959: Rename imp to _imp and add Lib/imp.py and beginBrett Cannon2012-04-153-2774/+2775
| | | | | | | | | | | | | | 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.
* | Issue #14582: Import returns the module returned by a loader insteadBrett Cannon2012-04-152-466/+477
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Set ImportError.name when raising the exception in the case of NoneBrett Cannon2012-04-151-2/+5
| | | | | | | | found in sys.modules.
* | Plug a refleak.Brett Cannon2012-04-151-2/+1
| |
* | Handle importing pkg.mod by executingBrett Cannon2012-04-152-252/+266
| | | | | | | | | | __import__('mod', {'__packaging__': 'pkg', level=1) w/o properly (and thus not segfaulting).