summaryrefslogtreecommitdiffstats
path: root/Python/Python-ast.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-31572: Get rid of _PyObject_HasAttrId() in the ASDL parser. (#3725)Serhiy Storchaka2017-11-111-610/+774
| | | Silence only expected AttributeError.
* bpo-31095: fix potential crash during GC (GH-2974)INADA Naoki2017-08-241-0/+2
|
* Fix a shadow-compatible-local warning (#2180)Yuan Chao Chou2017-08-041-165/+165
| | | | Change the shadowing naming, 'value' (Python-ast.c:4652), to 'val' to prevent the variables from being misused.
* bpo-29622: Make AST constructor to accept less than enough number of ↵INADA Naoki2017-02-231-19/+17
| | | | | | | | | | | positional arguments (GH-249) bpo-29463 added optional "docstring" field to 4 AST types. While it is optional, it breaks backward compatibility because AST constructor requires number of positional argument is same to number of fields. AST types accepts empty arguments, and incomplete keyword arguments. But it's not big problem because field can be filled after creation, and checked when compiling. So stop requiring complete set of fields for positional arguments too.
* bpo-29463: Add docstring field to some AST nodes. (#46)INADA Naoki2017-02-221-17/+90
| | | | | | | | | | | * bpo-29463: Add docstring field to some AST nodes. ClassDef, ModuleDef, FunctionDef, and AsyncFunctionDef has docstring field for now. It was first statement of there body. * fix document. thanks travis! * doc fixes
* Issue #29369: Use Py_IDENTIFIER in Python-ast.cINADA Naoki2017-01-251-6/+12
|
* Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE whereverSerhiy Storchaka2017-01-231-22/+11
| | | | possible. Patch is writen with Coccinelle.
* Issue #24098: Fixed possible crash when AST is changed in process ofSerhiy Storchaka2016-10-071-0/+220
|\ | | | | | | compiling it.
| * Issue #24098: Fixed possible crash when AST is changed in process ofSerhiy Storchaka2016-10-071-0/+216
| | | | | | | | compiling it.
| * Issue #25555: Fix parser and AST: fill lineno and col_offset of "arg" node whenVictor Stinner2015-11-061-2/+29
| | | | | | | | compiling AST from Python objects.
* | Issue #28008: Implement PEP 530 -- asynchronous comprehensions.Yury Selivanov2016-09-091-3/+24
| |
* | Issue #27985: Implement PEP 526 -- Syntax for Variable Annotations.Yury Selivanov2016-09-091-1/+123
| | | | | | | | Patch by Ivan Levkivskyi.
* | Issue #26146: remove useless codeVictor Stinner2016-01-261-7/+0
| | | | | | | | | | | | | | | | obj2ast_constant() code is baesd on obj2ast_object() which has a special case for Py_None. But in practice, we don't need to have a special case for constants. Issue noticed by Joseph Jevnik on a review.
* | Add ast.ConstantVictor Stinner2016-01-251-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #26146: Add a new kind of AST node: ast.Constant. It can be used by external AST optimizers, but the compiler does not emit directly such node. An optimizer can replace the following AST nodes with ast.Constant: * ast.NameConstant: None, False, True * ast.Num: int, float, complex * ast.Str: str * ast.Bytes: bytes * ast.Tuple if items are constants too: tuple * frozenset Update code to accept ast.Constant instead of ast.Num and/or ast.Str: * compiler * docstrings * ast.literal_eval() * Tools/parser/unparse.py
* | Issue #25555: Fix parser and AST: fill lineno and col_offset of "arg" node whenVictor Stinner2015-11-061-2/+29
| | | | | | | | compiling AST from Python objects.
* | Issue #24965: Implement PEP 498 "Literal String Interpolation". ↵Eric V. Smith2015-09-191-0/+165
| | | | | | | | Documentation is still needed, I'll open an issue for that.
* | Issue #15989: Fixed some scarcely probable integer overflows.Serhiy Storchaka2015-09-061-1/+1
|/ | | | It is very unlikely that they can occur in real code for now.
* PEP 0492 -- Coroutines with async and await syntax. Issue #24017.Yury Selivanov2015-05-121-0/+473
|
* PEP 448: additional unpacking generalizations (closes #2292)Benjamin Peterson2015-05-061-93/+12
| | | | Patch by Neil Girdhar.
* PEP 465: a dedicated infix operator for matrix multiplication (closes #21176)Benjamin Peterson2014-04-101-3/+21
|
* merge 3.3 (#20588)Benjamin Peterson2014-02-111-2/+6
|\
| * don't put runtime values in array initializer for C89 compliance (closes #20588)Benjamin Peterson2014-02-111-2/+6
| |
* | Issue #4555: All exported C symbols are now prefixed with either "Py" or "_Py".Antoine Pitrou2013-10-121-48/+48
| | | | | | | | ("make smelly" now clean)
* | Issue #18552: Check return value of PyArena_AddPyObject() in obj2ast_object().Christian Heimes2013-07-261-3/+7
|\ \ | |/
| * Issue #18552: Check return value of PyArena_AddPyObject() in obj2ast_object().Christian Heimes2013-07-261-3/+7
| |
* | (Merge 3.3) Parser/asdl_c.py: use Py_CLEAR()Victor Stinner2013-07-261-266/+133
|\ \ | |/
| * Parser/asdl_c.py: use Py_CLEAR()Victor Stinner2013-07-261-268/+134
| |
* | (Merge 3.3) According to the PEP 7, C code must "use 4-space indents"Victor Stinner2013-07-261-5856/+5811
|\ \ | |/ | | | | Replace 8 spaces with 4.
| * According to the PEP 7, C code must "use 4-space indents"Victor Stinner2013-07-261-5824/+5779
| | | | | | | | Replace 8 spaces with 4.
* | Issue #18408: Fix Python-ast.c: handle init_types() failure (ex: MemoryError)Victor Stinner2013-07-161-3/+6
| |
* | Issue #17917: Use PyModule_AddIntMacro() instead of PyModule_AddIntConstant()Charles-Francois Natali2013-05-201-1/+1
| | | | | | | | when applicable.
* | bump Python-ast.cBenjamin Peterson2013-03-191-1/+2
| |
* | refactor to fix refleaksBenjamin Peterson2013-03-191-22/+34
| |
* | unify some ast.argument's attrs; change Attribute column offset (closes #16795)Benjamin Peterson2013-03-181-102/+81
| | | | | | | | Patch from Sven Brauch.
* | Replace IOError with OSError (#16715)Andrew Svetlov2012-12-251-1/+0
| |
* | create NameConstant AST class for None, True, and False literals (closes #16619)Benjamin Peterson2012-12-061-0/+73
|/
* Issue #16546: make ast.YieldFrom argument mandatory.Mark Dickinson2012-11-251-1/+7
|
* add gc support to the AST base type (closes #15293)Benjamin Peterson2012-07-081-4/+17
|
* Issue #15291: Fix a memory leak where AST nodes where not properly deallocated.Antoine Pitrou2012-07-081-0/+1
|
* use Py_ssize_t for ast sequence lengthsBenjamin Peterson2012-05-151-2/+2
|
* Document f4d7ad6c9d6e.Martin v. Löwis2012-05-151-2/+2
|
* Widen ASDL sequences to Py_ssize_t lengths to better match PEP 353.Martin v. Löwis2012-05-151-2/+2
|
* free AST's dictBenjamin Peterson2012-03-151-1/+7
|
* Try to fix compilation of Python-ast.c on Visual Studio 2008Victor Stinner2012-03-131-1/+1
|
* give the AST class a __dict__Benjamin Peterson2012-03-121-3/+15
|
* make YieldFrom its own distinct from Yield (closes #13780)Benjamin Peterson2012-01-141-15/+47
|
* Issue #13645: pyc files now contain the size of the corresponding sourceAntoine Pitrou2012-01-131-1/+1
| | | | | code, to avoid timestamp collisions (especially on filesystems with a low timestamp resolution) when checking for freshness of the bytecode.
* Implement PEP 380 - 'yield from' (closes #11682)Nick Coghlan2012-01-131-3/+24
|
* Merge branch 3.2Amaury Forgeot d'Arc2011-11-221-5/+1
|\
| * Issue #13436: commit regenerated Python-ast.cAmaury Forgeot d'Arc2011-11-221-5/+1
| |