summaryrefslogtreecommitdiff
path: root/Python/ast_unparse.c
Commit message (Collapse)AuthorAgeFilesLines
* gh-100227: Move _str_replace_inf to PyInterpreterState (gh-102333)Eric Snow2023-02-281-5/+14
| | | https://github.com/python/cpython/issues/100227
* gh-81057: Move Global Variables Holding Objects to _PyRuntimeState. (gh-99487)Eric Snow2022-11-141-1/+1
| | | | | This moves nearly all remaining object-holding globals in core code (other than static types). https://github.com/python/cpython/issues/81057
* bpo-43224: Implement PEP 646 grammar changes (GH-31018)Matthew Rahtz2022-03-261-12/+1
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* bpo-46765: Replace Locally Cached Strings with Statically Initialized ↵Eric Snow2022-02-221-29/+9
| | | | | Objects (gh-31366) https://bugs.python.org/issue46765
* bpo-43892: Make match patterns explicit in the AST (GH-25585)Nick Coghlan2021-04-281-4/+9
| | | Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
* bpo-43244: Remove ast.h, asdl.h, Python-ast.h headers (GH-24933)Victor Stinner2021-03-231-3/+3
| | | | | | | | | | | | | | | | These functions were undocumented and excluded from the limited C API. Most names defined by these header files were not prefixed by "Py" and so could create names conflicts. For example, Python-ast.h defined a "Yield" macro which was conflict with the "Yield" name used by the Windows <winbase.h> header. Use the Python ast module instead. * Move Include/asdl.h to Include/internal/pycore_asdl.h. * Move Include/Python-ast.h to Include/internal/pycore_ast.h. * Remove ast.h header file. * pycore_symtable.h no longer includes Python-ast.h.
* bpo-41746: Add type information to asdl_seq objects (GH-22223)Pablo Galindo2020-09-161-4/+4
| | | | | | | | | | | | | * Add new capability to the PEG parser to type variable assignments. For instance: ``` | a[asdl_stmt_seq*]=';'.small_stmt+ [';'] NEWLINE { a } ``` * Add new sequence types from the asdl definition (automatically generated) * Make `asdl_seq` type a generic aliasing pointer type. * Create a new `asdl_generic_seq` for the generic case using `void*`. * The old `asdl_seq_GET`/`ast_seq_SET` macros now are typed. * New `asdl_seq_GET_UNTYPED`/`ast_seq_SET_UNTYPED` macros for dealing with generic sequences. * Changes all possible `asdl_seq` types to use specific versions everywhere.
* bpo-40663: Correctly handle annotations with subscripts in ast_unparse.c ↵Batuhan Taskaya2020-05-181-1/+12
| | | | (GH-20156)
* Add spaces around the ":=" operator in ast_unparse.c (GH-19568)Hakan Çelik2020-04-181-1/+1
|
* bpo-39522: Use _PyUnicodeWriter_WriteStr instead of PyUnicode_AS_DATA (GH-19523)Batuhan Taşkaya2020-04-141-2/+4
|
* bpo-395222: Correctly unparse unicode prefix in ast_unparse.c (GH-19512)Batuhan Taşkaya2020-04-141-0/+2
|
* bpo-32894: Support unparsing of infinity numbers in ast_unparser.c (GH-17426)Batuhan Taşkaya2020-04-141-5/+53
|
* bpo-34822: Simplify AST for subscription. (GH-9605)Serhiy Storchaka2020-03-101-40/+11
| | | | | | | | | * Remove the slice type. * Make Slice a kind of the expr type instead of the slice type. * Replace ExtSlice(slices) with Tuple(slices, Load()). * Replace Index(value) with a value itself. All non-terminal nodes in AST for expressions are now of the expr type.
* closes bpo-39898: Remove unused arg from append_formattedvalue. (GH-18840)Andy Lester2020-03-081-4/+4
|
* bpo-39520: Fix un-parsing of ext slices with no dimensions (GH-18304)Batuhan Taşkaya2020-03-011-0/+1
|
* bpo-37050: Remove expr_text from FormattedValue ast node, use Constant node ↵Eric V. Smith2019-05-271-5/+0
| | | | | instead (GH-13597) When using the "=" debug functionality of f-strings, use another Constant node (or a merged constant node) instead of adding expr_text to the FormattedValue node.
* bpo-36961: Handle positional-only arguments in uparse.c (GH-13412)Pablo Galindo2019-05-181-6/+16
|
* Add support for PEP572 in ast_unparse.c (GH-13337)Batuhan Taşkaya2019-05-181-0/+13
|
* bpo-36817: Add f-string debugging using '='. (GH-13123)Eric V. Smith2019-05-081-0/+5
| | | If a "=" is specified a the end of an f-string expression, the f-string will evaluate to the text of the expression, followed by '=', followed by the repr of the value of the expression.
* bpo-34854: Fix compiling string annotations containing lambdas. (GH-9645)Serhiy Storchaka2018-09-301-4/+7
| | | | | | | | | | * Compiling a string annotation containing a lambda with keyword-only argument without default value caused a crash. * Remove the final "*" (it is incorrect syntax) in the representation of lambda without *args and keyword-only arguments when compile from AST. * Improve the representation of lambda without arguments.
* bpo-32892: Use ast.Constant instead of specific constant AST types. (GH-9445)Serhiy Storchaka2018-09-271-17/+7
|
* bpo-33475: Fix and improve converting annotations to strings. (GH-6774)Serhiy Storchaka2018-05-161-536/+290
|
* bpo-32711: Fix warnings for Python/ast_unparse.c (#5426)Stéphane Wirtel2018-02-011-3/+7
| | | * bpo-32711: Fix warnings for Python/ast_unparse.c
* String annotations [PEP 563] (#4390)Guido van Rossum2018-01-261-0/+1163
* Document `from __future__ import annotations` * Provide plumbing and tests for `from __future__ import annotations` * Implement unparsing the AST back to string form This is required for PEP 563 and as such only implements a part of the unparsing process that covers expressions.