Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Make the unicode equality test an external function rather than in-lining it. | Raymond Hettinger | 2015-07-04 | 1 | -0/+4 |
| | | | | | | | | The real benefit of the unicode specialized function comes from bypassing the overhead of PyObject_RichCompareBool() and not from being in-lined (especially since there was almost no shared data between the caller and callee). Also, the in-lining was having a negative effect on code generation for the callee. | ||||
* | Merge 3.5 (Issue #19235) | Yury Selivanov | 2015-07-03 | 2 | -3/+4 |
|\ | |||||
| * | Issue #19235: Add new RecursionError exception. Patch by Georg Brandl. | Yury Selivanov | 2015-07-03 | 2 | -3/+4 |
| | | |||||
* | | Issue #24400: Merge 3.5 | Yury Selivanov | 2015-06-22 | 2 | -26/+34 |
|\ \ | |/ | |||||
| * | Issue #24400: Introduce a distinct type for 'async def' coroutines. | Yury Selivanov | 2015-06-22 | 2 | -26/+34 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 |
| |\ | |||||
| | * | 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. | ||||
| | * | Issue #24436: Added const qualifiers for char* arguments of _PyTraceback_Add. | Serhiy Storchaka | 2015-06-21 | 1 | -1/+1 |
| | | | | | | | | | | | | Patch by Michael Ensslin. | ||||
* | | | Issue 24342: No need to use PyAPI_FUNC for _PyEval_ApplyCoroutineWrapper | Yury Selivanov | 2015-06-03 | 1 | -1/+0 |
|\ \ \ | |/ / | | | | | | | (Merge 3.5) | ||||
| * | | Issue 24342: No need to use PyAPI_FUNC for _PyEval_ApplyCoroutineWrapper | Yury Selivanov | 2015-06-03 | 1 | -1/+0 |
| | | | |||||
* | | | Issue 24365: Merge 3.5 | Yury Selivanov | 2015-06-02 | 3 | -9/+27 |
|\ \ \ | |/ / | |||||
| * | | Issue 24365: Conditionalize PEP 489 additions to the stable ABI | Yury Selivanov | 2015-06-02 | 3 | -9/+27 |
| | | | | | | | | | | | | Patch by Petr Viktorin. | ||||
* | | | Issue 24342: Let wrapper set by sys.set_coroutine_wrapper fail gracefully | Yury Selivanov | 2015-06-02 | 2 | -1/+3 |
|\ \ \ | |/ / | | | | | | | (Merge 3.5) | ||||
| * | | Issue 24342: Let wrapper set by sys.set_coroutine_wrapper fail gracefully | Yury Selivanov | 2015-06-02 | 2 | -1/+3 |
| | | | |||||
* | | | Merge from 3.5. | Eric Snow | 2015-06-02 | 1 | -0/+2 |
|\ \ \ | |/ / | |||||
| * | | Issue #24347: Set KeyError if PyDict_GetItemWithError returns NULL. | Eric Snow | 2015-06-02 | 1 | -0/+2 |
| | | | |||||
* | | | Issue 24017: Make PyEval_(Set|Get)CoroutineWrapper private | Yury Selivanov | 2015-06-01 | 1 | -2/+2 |
|\ \ \ | |/ / | |||||
| * | | Issue 24017: Make PyEval_(Set|Get)CoroutineWrapper private | Yury Selivanov | 2015-06-01 | 1 | -2/+2 |
| | | | |||||
* | | | merge 3.5 (#24345) | Benjamin Peterson | 2015-06-01 | 1 | -0/+1 |
|\ \ \ | |/ / | |||||
| * | | add Py_tp_finalize slot (closes #24345) | Benjamin Peterson | 2015-06-01 | 1 | -0/+1 |
| | | | | | | | | | | | | Patch from Petr Viktorin. | ||||
| * | | Post-release updates for Python 3.5.0b2. | Larry Hastings | 2015-06-01 | 1 | -1/+1 |
| | | | |||||
| * | | Version bump for Python 3.5.0b2.v3.5.0b2 | Larry Hastings | 2015-05-31 | 1 | -2/+2 |
| | | | |||||
* | | | Merge from 3.5. | Eric Snow | 2015-05-30 | 1 | -1/+0 |
|\ \ \ | |/ / | |||||
| * | | Issue #16991: Drop Py_ODict_GetItemId. | Eric Snow | 2015-05-30 | 1 | -1/+0 |
| | | | |||||
* | | | Merge from 3.5. | Eric Snow | 2015-05-30 | 2 | -4/+4 |
|\ \ \ | |/ / | |||||
| * | | Issue #16991: Use PyObject_TypeCheck instead of PyObject_IsInstance. | Eric Snow | 2015-05-30 | 2 | -4/+4 |
| | | | |||||
| * | | Reverting my previous commit. | Yury Selivanov | 2015-05-30 | 1 | -4/+4 |
|/ / | | | | | | | Something went horribly wrong when I was doing `hg rebase`. | ||||
* | | Issue #16991: Add a C implementation of collections.OrderedDict. | Eric Snow | 2015-05-30 | 3 | -3/+55 |
| | | |||||
* | | merge 3.5 | Benjamin Peterson | 2015-05-28 | 1 | -1/+0 |
|\ \ | |||||
| * | | remove STORE_MAP, since it's unused | Benjamin Peterson | 2015-05-28 | 1 | -1/+0 |
| | | | |||||
* | | | Issue 24017: Drop getawaitablefunc and friends in favor of unaryfunc. | Yury Selivanov | 2015-05-28 | 1 | -6/+3 |
|\ \ \ | |/ / | |||||
| * | | Issue 24017: Drop getawaitablefunc and friends in favor of unaryfunc. | Yury Selivanov | 2015-05-28 | 1 | -6/+3 |
| | | | |||||
* | | | Issue #24288: Generated opcode.h no longer contains trailing spaces and tabs. | Serhiy Storchaka | 2015-05-27 | 1 | -115/+115 |
|\ \ \ | |/ / | |||||
| * | | Issue #24288: Generated opcode.h no longer contains trailing spaces and tabs. | Serhiy Storchaka | 2015-05-27 | 1 | -115/+115 |
| | | | |||||
* | | | Version bump for trunk to 3.6.0a0. Welcome to the future! | Larry Hastings | 2015-05-25 | 1 | -4/+4 |
|/ / | |||||
* | | Post-release fixes for 3.5.0b1. | Larry Hastings | 2015-05-24 | 1 | -1/+1 |
| | | |||||
* | | Version bump for 3.5.0b1.v3.5.0b1 | Larry Hastings | 2015-05-24 | 1 | -3/+3 |
| | | |||||
* | | Issue #24268: Adds PyModuleDef_Init and PyModuleDef_Type to python3.def ↵ | Steve Dower | 2015-05-23 | 1 | -1/+1 |
| | | | | | | | | (stable ABI) | ||||
* | | PEP 489: Multi-phase extension module initialization | Nick Coghlan | 2015-05-23 | 2 | -24/+54 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 #24221: Small optimizations for heapq. | Raymond Hettinger | 2015-05-22 | 1 | -0/+1 |
| | | | | | | | | | | | | | | Replaces the PyList_GET_ITEM and PyList_SET_ITEM macros with normal array accesses. Replace the siftup unpredicatable branch with arithmetic. Replace the rc == -1 tests with rc < 0. Gives nicer looking assembly with both Clang and GCC-4.9. Also gives a small performance both for both. | ||||
* | | Issue #22486: Added the math.gcd() function. The fractions.gcd() function ↵ | Serhiy Storchaka | 2015-05-12 | 1 | -0/+3 |
| | | | | | | | | | | | | now is deprecated. Based on patch by Mark Dickinson. | ||||
* | | Fix warnings for PyEval_GetCoroutineWrapper | Yury Selivanov | 2015-05-12 | 1 | -1/+1 |
| | | |||||
* | | PEP 0492 -- Coroutines with async and await syntax. Issue #24017. | Yury Selivanov | 2015-05-12 | 11 | -152/+229 |
| | | |||||
* | | PEP 479: Change StopIteration handling inside generators. | Yury Selivanov | 2015-05-09 | 3 | -1/+4 |
| | | | | | | | | Closes issue #22906. | ||||
* | | PEP 448: additional unpacking generalizations (closes #2292) | Benjamin Peterson | 2015-05-06 | 3 | -12/+15 |
| | | | | | | | | Patch by Neil Girdhar. | ||||
* | | remove the concept of an unoptimized function scope from the compiler, since ↵ | Benjamin Peterson | 2015-04-28 | 1 | -5/+0 |
| | | | | | | | | it can't happen anymore | ||||
* | | Add the files missing from c9f1630cf2b1 for issue9951. | Gregory P. Smith | 2015-04-26 | 1 | -0/+17 |
| | | | | | | | | hg status should be my friend more often... |