Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | set items in dict displays from left to right (closes #24569) | Benjamin Peterson | 2015-07-05 | 1 | -6/+9 |
| | |||||
* | Issue #19235: Add new RecursionError exception. Patch by Georg Brandl. | Yury Selivanov | 2015-07-03 | 3 | -4/+4 |
| | |||||
* | Issue #24528: Improve error message for awaits in comprehensions | Yury Selivanov | 2015-06-30 | 1 | -1/+4 |
| | |||||
* | Issue #24400: Introduce a distinct type for 'async def' coroutines. | Yury Selivanov | 2015-06-22 | 4 | -151/+148 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration") | ||||
* | Added the const qualifier for char* argument of Py_EnterRecursiveCall(). | Serhiy Storchaka | 2015-06-21 | 1 | -1/+1 |
|\ | |||||
| * | Added the const qualifier for char* argument of Py_EnterRecursiveCall(). | Serhiy Storchaka | 2015-06-21 | 1 | -1/+1 |
| | | |||||
* | | Issue #24436: Added const qualifiers for char* arguments of _PyTraceback_Add. | Serhiy Storchaka | 2015-06-21 | 1 | -1/+1 |
|\ \ | |/ | | | | | Patch by Michael Ensslin. | ||||
| * | Issue #24436: Added const qualifiers for char* arguments of _PyTraceback_Add. | Serhiy Storchaka | 2015-06-21 | 1 | -1/+1 |
| | | | | | | | | Patch by Michael Ensslin. | ||||
* | | Fixed indentation of Python examples in C comments. | Serhiy Storchaka | 2015-06-11 | 1 | -2/+2 |
|\ \ | |/ | |||||
| * | Fixed indentation of Python examples in C comments. | Serhiy Storchaka | 2015-06-11 | 1 | -2/+2 |
| | | |||||
* | | Issue 24374: Plug refleak in set_coroutine_wrapper | Yury Selivanov | 2015-06-04 | 1 | -31/+19 |
| | | |||||
* | | Issue 24342: No need to use PyAPI_FUNC for _PyEval_ApplyCoroutineWrapper | Yury Selivanov | 2015-06-02 | 1 | -28/+30 |
| | | |||||
* | | Issue 24366: Merge 3.4 | Yury Selivanov | 2015-06-02 | 1 | -1/+1 |
|\ \ | |/ | |||||
| * | Issue 24366: Merge 3.3 | Yury Selivanov | 2015-06-02 | 1 | -1/+1 |
| |\ | |||||
| | * | Issue 24366: Indent code (thanks to li4ick for reporting). | Yury Selivanov | 2015-06-02 | 1 | -1/+1 |
| | | | |||||
* | | | Issue 24342: Let wrapper set by sys.set_coroutine_wrapper fail gracefully | Yury Selivanov | 2015-06-02 | 2 | -9/+31 |
| | | | |||||
* | | | Issue 24017: Make PyEval_(Set|Get)CoroutineWrapper private | Yury Selivanov | 2015-06-01 | 2 | -6/+6 |
| | | | |||||
* | | | Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(), | Serhiy Storchaka | 2015-05-30 | 2 | -6/+11 |
|\ \ \ | |/ / | | | | | | | | | | PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains() to check for and handle errors correctly. | ||||
| * | | Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(), | Serhiy Storchaka | 2015-05-30 | 2 | -6/+11 |
| | | | | | | | | | | | | | | | PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains() to check for and handle errors correctly. | ||||
* | | | Specify default values of semantic booleans in Argument Clinic generated ↵ | Serhiy Storchaka | 2015-05-30 | 2 | -9/+9 |
| | | | | | | | | | | | | signatures as booleans. | ||||
* | | | Use converter names instead of format units in Argument Clinic descriptions | Serhiy Storchaka | 2015-05-30 | 1 | -72/+72 |
| | | | | | | | | | | | | in builtin and _crypt modules. | ||||
* | | | fix importing one char extension modules (closes #24328) | Benjamin Peterson | 2015-05-29 | 1 | -10/+9 |
| | | | |||||
* | | | remove STORE_MAP, since it's unused | Benjamin Peterson | 2015-05-28 | 3 | -18/+1 |
| | | | |||||
* | | | in dict displays, evaluate the key before the value (closes #11205) | Benjamin Peterson | 2015-05-28 | 3 | -112/+112 |
| | | | | | | | | | | | | Patch partially by Steve Dougherty. | ||||
* | | | Issue 24017: Drop getawaitablefunc and friends in favor of unaryfunc. | Yury Selivanov | 2015-05-28 | 1 | -2/+2 |
| | | | |||||
* | | | Issue #24285: fix importing extensions from packages | Nick Coghlan | 2015-05-26 | 1 | -1/+1 |
| | | | |||||
* | | | Issue #24268: Fix import naming when loading extension modules. Patch by ↵ | Steve Dower | 2015-05-23 | 3 | -4/+4 |
| | | | | | | | | | | | | Petr Viktorin. | ||||
* | | | Issue #24268: Fixes generation of init import name on Windows. | Steve Dower | 2015-05-23 | 1 | -1/+1 |
| | | | |||||
* | | | PEP 489: Multi-phase extension module initialization | Nick Coghlan | 2015-05-23 | 13 | -2867/+3090 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Known limitations of the current implementation: - documentation changes are incomplete - there's a reference leak I haven't tracked down yet The leak is most visible by running: ./python -m test -R3:3 test_importlib However, you can also see it by running: ./python -X showrefcount Importing the array or _testmultiphase modules, and then deleting them from both sys.modules and the local namespace shows significant increases in the total number of active references each cycle. By contrast, with _testcapi (which continues to use single-phase initialisation) the global refcounts stabilise after a couple of cycles. | ||||
* | | | Issue #24102: Fixed exception type checking in standard error handlers. | Serhiy Storchaka | 2015-05-18 | 1 | -27/+21 |
|\ \ \ | |/ / | |||||
| * | | Issue #24102: Fixed exception type checking in standard error handlers. | Serhiy Storchaka | 2015-05-18 | 1 | -24/+18 |
| | | | |||||
* | | | allow test node after ** in calls (closes #24176) | Benjamin Peterson | 2015-05-16 | 1 | -8/+4 |
| | | | |||||
* | | | Issue #24192: Fix namespace package imports. | Eric Snow | 2015-05-15 | 2 | -4525/+4482 |
| | | | |||||
* | | | Issue 24017: fix for "async with" refcounting | Nick Coghlan | 2015-05-13 | 1 | -0/+2 |
| | | | | | | | | | | | | | | | | | | * adds missing INCREF in WITH_CLEANUP_START * adds missing DECREF in WITH_CLEANUP_FINISH * adds several new tests Yury created while investigating this | ||||
* | | | use our normal bracing style | Benjamin Peterson | 2015-05-12 | 1 | -1/+2 |
| | | | |||||
* | | | Issue #24017: Plug ref leak. | Yury Selivanov | 2015-05-12 | 1 | -2/+0 |
| | | | |||||
* | | | Fix warnings for PyEval_GetCoroutineWrapper | Yury Selivanov | 2015-05-11 | 1 | -1/+1 |
| | | | |||||
* | | | PEP 0492 -- Coroutines with async and await syntax. Issue #24017. | Yury Selivanov | 2015-05-11 | 12 | -5389/+6617 |
| | | | |||||
* | | | PEP 479: Change StopIteration handling inside generators. | Yury Selivanov | 2015-05-09 | 1 | -0/+2 |
| | | | | | | | | | | | | Closes issue #22906. | ||||
* | | | Merge 3.4 | Benjamin Peterson | 2015-05-07 | 1 | -5/+4 |
|\ \ \ | |/ / | |||||
| * | | shorten capsule name macro; it doesn't need to be so long | Benjamin Peterson | 2015-05-07 | 1 | -4/+4 |
| | | | |||||
* | | | PEP 448: additional unpacking generalizations (closes #2292) | Benjamin Peterson | 2015-05-05 | 8 | -1902/+2211 |
| | | | | | | | | | | | | Patch by Neil Girdhar. | ||||
* | | | merge 3.4 (#24096) | Benjamin Peterson | 2015-05-03 | 1 | -10/+27 |
|\ \ \ | |/ / | |||||
| * | | merge 3.3 (#24096) | Benjamin Peterson | 2015-05-03 | 1 | -10/+27 |
| |\ \ | | |/ | |||||
| | * | be more robust against the filters list changing under us (closes #24096) | Benjamin Peterson | 2015-05-03 | 1 | -6/+16 |
| | | | |||||
* | | | Issue #23911: Move path-based bootstrap code to a separate frozen module. | Eric Snow | 2015-05-02 | 5 | -4316/+4592 |
| | | | |||||
* | | | remove the concept of an unoptimized function scope from the compiler, since ↵ | Benjamin Peterson | 2015-04-27 | 2 | -21/+2 |
| | | | | | | | | | | | | it can't happen anymore | ||||
* | | | Silence a gcc "may be used uninitialized" compiler warning. Not true. | Gregory P. Smith | 2015-04-25 | 1 | -0/+1 |
| | | | | | | | | | | | | Initializing retval prevents the naive warning. | ||||
* | | | Add missing PyAPI_FUNC macro's to the public functions as other .c files do | Gregory P. Smith | 2015-04-26 | 1 | -2/+2 |
| | | | | | | | | | | | | | | | in hopes that this fixes the windows extension module link error for modules trying to call _Py_strhex functions. issue9951. | ||||
* | | | Add the files missing from c9f1630cf2b1 for issue9951. | Gregory P. Smith | 2015-04-26 | 1 | -0/+60 |
| | | | | | | | | | | | | hg status should be my friend more often... |