summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* 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).
* Rebuild importlib.h to incorporate added comments.Brett Cannon2012-04-151-30/+30
|
* Fix Windows buildBrian Curtin2012-04-141-3/+4
|
* Undo a C99 idiom.Brett Cannon2012-04-141-2/+2
|
* Issue #2377: Make importlib the implementation of __import__().Brett Cannon2012-04-149-533/+3433
| | | | | | | 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__().
* merge 3.2Benjamin Peterson2012-04-131-2/+2
|\
| * move outside WITH_THREAD conditionalBenjamin Peterson2012-04-131-2/+2
| |
* | merge 3.2Benjamin Peterson2012-04-131-4/+3
|\ \ | |/
| * take linkage def outside of WITH_THREAD conditional (closes #14569)Benjamin Peterson2012-04-131-4/+3
| |
* | Issue #1559549: Add 'name' and 'path' attributes to ImportError.Brett Cannon2012-04-131-0/+47
| | | | | | | | | | | | | | | | Currently import does not use these attributes as they are planned for use by importlib (which will be another commit). Thanks to Filip Gruszczyński for the initial patch and Brian Curtin for refining it.
* | Issue #14288: Serialization support for builtin iterators.Kristján Valur Jónsson2012-04-031-3/+53
| |
* | merge 3.2Benjamin Peterson2012-04-031-20/+31
|\ \ | |/
| * fix parse_syntax_error to clean up its resourcesBenjamin Peterson2012-04-031-20/+31
| |
* | Guard an LLTRACE variable to silence an unused variable warning.Brett Cannon2012-04-021-0/+2
| |
* | Issue #14383: Add _PyDict_GetItemId() and _PyDict_SetItemId() functionsVictor Stinner2012-03-261-4/+11
| | | | | | | | | | These functions simplify the usage of static constant Unicode strings. Generalize the usage of _Py_Identifier in ceval.c and typeobject.c.
* | Merge with 3.2Kristján Valur Jónsson2012-03-231-1/+1
|\ \ | |/
| * Fix typo when "PyObject*" was changed to "identifier"Kristján Valur Jónsson2012-03-231-1/+1
| |
* | merge 3.2Benjamin Peterson2012-03-221-1/+1
|\ \ | |/
| * this should technicaly be identifierBenjamin Peterson2012-03-221-1/+1
| |
* | merge 3.2Benjamin Peterson2012-03-221-1/+2
|\ \ | |/
| * check for NULLBenjamin Peterson2012-03-221-1/+2
| |
* | merge 3.2 (#14378)Benjamin Peterson2012-03-221-8/+2
|\ \ | |/
| * check by equality for __future__ not identity (closes #14378)Benjamin Peterson2012-03-221-8/+2
| |
| * Fixes Issue #14331: Use significantly less stack space when importing modules byGregory P. Smith2012-03-181-39/+127
| | | | | | | | allocating path buffers on the heap instead of the stack.
* | use identifier apiBenjamin Peterson2012-03-211-1/+2
| |
* | Issue #14328: Add keyword-only parameters to PyArg_ParseTupleAndKeywords.Larry Hastings2012-03-201-1/+33
| | | | | | | | | | | | They're optional-only for now (unlike in pure Python) but that's all I needed. The syntax can easily be relaxed if we want to support required keyword-only arguments for extension types in the future.
* | plug memory leak (closes #14325)Benjamin Peterson2012-03-161-1/+1
| |
* | kill capsule names that we don't need anymoreBenjamin Peterson2012-03-161-4/+0
| |
* | use memory macrosBenjamin Peterson2012-03-161-3/+3
| |
* | check result of PyMem_NewBenjamin Peterson2012-03-161-0/+8
| |
* | in 72556ff86828, I should have updated the magic as well as the comment (#14230)Benjamin Peterson2012-03-161-1/+1
| |
* | Issue #14325: Stop using python lists, capsules, and the garbage collector ↵Jean-Paul Calderone2012-03-161-120/+85
| | | | | | | | to deal with PyArg_Parse* cleanup.
* | fix commentBenjamin Peterson2012-03-151-2/+2
| |
* | perform yield from delegation by repeating YIELD_FROM opcode (closes #14230)Benjamin Peterson2012-03-153-38/+29
| | | | | | | | | | | | | | This allows generators that are using yield from to be seen by debuggers. It also kills the f_yieldfrom field on frame objects. Patch mostly from Mark Shannon with a few tweaks by me.
* | free AST's dictBenjamin Peterson2012-03-151-1/+7
| |
* | Issue #14184: mergeNed Deily2012-03-131-8/+12
|\ \ | |/
| * Issue #14184: Increase the default stack size for secondary threads onNed Deily2012-03-131-8/+12
| | | | | | | | Mac OS X to prevent interpreter crashes when compiled on 10.7.
* | Issue #14180: Fix an invalid rounding when compiler optimization are enabledVictor Stinner2012-03-131-1/+3
| | | | | | | | Use volatile keyword to disable localy unsafe float optimizations.
* | Issue #14180: Remove commented codeVictor Stinner2012-03-131-2/+0
| |
* | Close #14180: Factorize code to convert a number of seconds to time_t, ↵Victor Stinner2012-03-131-22/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | timeval or timespec time.ctime(), gmtime(), time.localtime(), datetime.date.fromtimestamp(), datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp() now raises an OverflowError, instead of a ValueError, if the timestamp does not fit in time_t. datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp() now round microseconds towards zero instead of rounding to nearest with ties going away from zero.
* | Try to fix compilation of Python-ast.c on Visual Studio 2008Victor Stinner2012-03-131-1/+1
| |
* | merge 3.2Benjamin Peterson2012-03-121-6/+0
|\ \ | |/
| * kill this disabled codeBenjamin Peterson2012-03-121-6/+0
| |
* | merge 3.2Benjamin Peterson2012-03-121-2/+2
|\ \ | |/
| * use correct naming conventionBenjamin Peterson2012-03-121-2/+2
| |
* | give the AST class a __dict__Benjamin Peterson2012-03-121-3/+15
| |