Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix refleak. | Stefan Krah | 2015-07-27 | 1 | -1/+3 |
| | |||||
* | Issue #24687: Plug refleak on SyntaxError in function parameters annotations. | Yury Selivanov | 2015-07-23 | 1 | -14/+13 |
| | |||||
* | Issue #24619: More tests; fix nits in compiler.c | Yury Selivanov | 2015-07-22 | 1 | -3/+2 |
| | |||||
* | 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 | 1 | -6/+4 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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") | ||||
* | Fixed indentation of Python examples in C comments. | Serhiy Storchaka | 2015-06-10 | 1 | -2/+2 |
|\ | |||||
| * | Fixed indentation of Python examples in C comments. | Serhiy Storchaka | 2015-06-10 | 1 | -2/+2 |
| | | |||||
* | | remove STORE_MAP, since it's unused | Benjamin Peterson | 2015-05-28 | 1 | -2/+0 |
| | | |||||
* | | in dict displays, evaluate the key before the value (closes #11205) | Benjamin Peterson | 2015-05-28 | 1 | -2/+2 |
| | | | | | | | | Patch partially by Steve Dougherty. | ||||
* | | PEP 0492 -- Coroutines with async and await syntax. Issue #24017. | Yury Selivanov | 2015-05-12 | 1 | -15/+273 |
| | | |||||
* | | 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-06 | 1 | -89/+230 |
| | | | | | | | | Patch by Neil Girdhar. | ||||
* | | remove the concept of an unoptimized function scope from the compiler, since ↵ | Benjamin Peterson | 2015-04-28 | 1 | -5/+2 |
| | | | | | | | | it can't happen anymore | ||||
* | | Issue #23192: Fixed generator lambdas. Patch by Bruno Cauet. | Serhiy Storchaka | 2015-03-11 | 1 | -2/+2 |
|\ \ | |/ | |||||
| * | Issue #23192: Fixed generator lambdas. Patch by Bruno Cauet. | Serhiy Storchaka | 2015-03-11 | 1 | -2/+2 |
| | | |||||
* | | merge 3.4 (#23048) | Benjamin Peterson | 2014-12-13 | 1 | -3/+2 |
|\ \ | |/ | |||||
| * | pop the loop block even for infinite while loops (closes #23048) | Benjamin Peterson | 2014-12-13 | 1 | -3/+2 |
| | | |||||
| * | Issue #22453: Warn against the use of leaking macro PyObject_REPR(). | Serhiy Storchaka | 2014-11-18 | 1 | -10/+10 |
| | | |||||
* | | Issue #22869: Split pythonrun into two modules | Nick Coghlan | 2014-11-20 | 1 | -2/+0 |
| | | | | | | | | | | | | | | - interpreter startup and shutdown code moved to a new pylifecycle.c module - Py_OptimizeFlag moved into the new module with the other global flags | ||||
* | | Issue #22453: Removed non-documented macro PyObject_REPR(). | Serhiy Storchaka | 2014-11-18 | 1 | -10/+10 |
| | | |||||
* | | Closes #11471: avoid generating a JUMP_FORWARD instruction at the end of an ↵ | Antoine Pitrou | 2014-09-18 | 1 | -3/+3 |
| | | | | | | | | | | | | if-block if there is no else-clause. Original patch by Eugene Toder. | ||||
* | | Issue #21523: Fix over-pessimistic computation of the stack effect of some ↵ | Antoine Pitrou | 2014-05-23 | 1 | -2/+6 |
|\ \ | |/ | | | | | | | | | | | opcodes in the compiler. This also fixes a quadratic compilation time issue noticeable when compiling code with a large number of "and" and "or" operators. | ||||
| * | Issue #21523: Fix over-pessimistic computation of the stack effect of some ↵ | Antoine Pitrou | 2014-05-23 | 1 | -2/+6 |
| | | | | | | | | | | | | | | opcodes in the compiler. This also fixes a quadratic compilation time issue noticeable when compiling code with a large number of "and" and "or" operators. | ||||
| * | Issue #20625: Fix compilation issue | Victor Stinner | 2014-02-18 | 1 | -1/+2 |
| | | |||||
| * | Mangle __parameters in __annotations__ dict properly. Issue #20625. | Yury Selivanov | 2014-02-18 | 1 | -1/+7 |
| | | |||||
* | | PEP 465: a dedicated infix operator for matrix multiplication (closes #21176) | Benjamin Peterson | 2014-04-10 | 1 | -0/+6 |
| | | |||||
* | | Issue #20625: Fix compilation issue | Victor Stinner | 2014-02-18 | 1 | -1/+2 |
| | | |||||
* | | Mangle __parameters in __annotations__ dict properly. Issue #20625. | Yury Selivanov | 2014-02-18 | 1 | -1/+7 |
|/ | |||||
* | upcast int to size_t to silence two ↵ | Christian Heimes | 2013-12-04 | 1 | -1/+1 |
| | | | | autological-constant-out-of-range-compare warnings with clang. | ||||
* | Issue #19722: Added opcode.stack_effect(), which accurately | Larry Hastings | 2013-11-23 | 1 | -8/+12 |
| | | | | computes the stack effect of bytecode instructions. | ||||
* | Issue #9566, #19617: Fix more compiler warnings in compile.c on Windows 64-bit | Victor Stinner | 2013-11-19 | 1 | -10/+13 |
| | |||||
* | Issue #9566, #19617: New try to fix compilation on Windows | Victor Stinner | 2013-11-19 | 1 | -1/+1 |
| | | | | | Some compilers (ex: Visual Studio) decode -2147483648 as a unsigned integer instead of an signed integer. | ||||
* | Issue #9566, #19617: Fix compilation on Windows | Victor Stinner | 2013-11-19 | 1 | -2/+2 |
| | | | | INT32_MIN and INT32_MAX constants are unknown on Windows. | ||||
* | Issue #9566: compile.c uses Py_ssize_t instead of int to store sizes to fix | Victor Stinner | 2013-11-19 | 1 | -48/+68 |
| | | | | | | | compiler warnings on Windows 64-bit. Use Py_SAFE_DOWNCAST() where the final downcast is needed. The bytecode doesn't support integer parameters larger than 32-bit yet. | ||||
* | Issue #19437: Fix compiler_class(), handle compiler_lookup_arg() failure | Victor Stinner | 2013-11-05 | 1 | -0/+4 |
| | |||||
* | cleanup the construction of __qualname__ (closes #19301 again) | Benjamin Peterson | 2013-10-20 | 1 | -70/+82 |
| | |||||
* | Close #19313: remove no longer needed Py_XINCREF | Nick Coghlan | 2013-10-20 | 1 | -1/+0 |
| | | | | Eliminates a refleak introduced in commit b4a325275fb0 | ||||
* | removal u_qualname, since compiler_scope_qualname is only ever called once | Benjamin Peterson | 2013-10-19 | 1 | -8/+0 |
| | |||||
* | strengthen condition and add assertion | Benjamin Peterson | 2013-10-19 | 1 | -1/+2 |
| | |||||
* | give explicitly global functions and classes a global __qualname__ (closes ↵ | Benjamin Peterson | 2013-10-19 | 1 | -17/+37 |
| | | | | #19301) | ||||
* | Issue #18783: Removed existing mentions of Python long type in docstrings, | Serhiy Storchaka | 2013-08-27 | 1 | -1/+1 |
|\ | | | | | | | error messages and comments. | ||||
| * | Issue #18783: Removed existing mentions of Python long type in docstrings, | Serhiy Storchaka | 2013-08-27 | 1 | -1/+1 |
| | | | | | | | | error messages and comments. | ||||
* | | Close #11619: The parser and the import machinery do not encode Unicode | Victor Stinner | 2013-08-26 | 1 | -20/+37 |
| | | | | | | | | filenames anymore on Windows. | ||||
* | | Issue #18408: Fix compiler_import() to handle PyUnicode_Substring() failure ↵ | Victor Stinner | 2013-07-11 | 1 | -1/+4 |
| | | | | | | | | properly | ||||
* | | fix compilation on Windows | Victor Stinner | 2013-05-16 | 1 | -1/+2 |
| | | |||||
* | | rather than passing locals to the class body, just execute the class body in ↵ | Benjamin Peterson | 2013-05-16 | 1 | -10/+1 |
| | | | | | | | | the proper environment | ||||
* | | hide the __class__ closure from the class body (#12370) | Benjamin Peterson | 2013-05-15 | 1 | -15/+49 |
| | | |||||
* | | check local class namespace before reaching for cells (closes #17853) | Benjamin Peterson | 2013-04-30 | 1 | -1/+4 |
| | | |||||
* | | Merge indentation fix from 3.3. | Ezio Melotti | 2013-04-19 | 1 | -6/+6 |
|\ \ | |/ |