Batuhan Taskaya
091951a67c
bpo-40528: Improve and clear several aspects of the ASDL definition code for the AST (GH-19952)
2020-05-06 15:29:32 +01:00
Victor Stinner
4a21e57fe5
bpo-40268: Remove unused structmember.h includes (GH-19530)
...
If only offsetof() is needed: include stddef.h instead.
When structmember.h is used, add a comment explaining that
PyMemberDef is used.
2020-04-15 02:35:41 +02:00
Pablo Galindo
168660b547
bpo-40141: Add line and column information to ast.keyword nodes (GH-19283)
2020-04-02 00:47:39 +01:00
Serhiy Storchaka
bace59d8b8
bpo-39999: Improve compatibility of the ast module. (GH-19056)
...
* Re-add removed classes Suite, slice, Param, AugLoad and AugStore.
* Add docstrings for dummy classes.
* Add docstrings for attribute aliases.
* Set __module__ to "ast" instead of "_ast".
2020-03-22 20:33:34 +02:00
Serhiy Storchaka
6b97598fb6
bpo-39988: Remove ast.AugLoad and ast.AugStore node classes. (GH-19038)
2020-03-17 23:41:08 +02:00
Batuhan Taşkaya
4ab362cec6
bpo-39638: Keep ASDL signatures in the AST nodes (GH-18515)
2020-03-16 10:12:53 +02:00
Batuhan Taşkaya
8689209e03
bpo-39969: Remove ast.Param node class as is no longer used (GH-19020)
2020-03-15 19:32:17 +00:00
Serhiy Storchaka
13d52c2686
bpo-34822: Simplify AST for subscription. (GH-9605)
...
* 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.
2020-03-10 18:52:34 +02:00
Serhiy Storchaka
b7e9525f9c
bpo-36287: Make ast.dump() not output optional fields and attributes with default values. (GH-18843)
...
The default values for optional fields and attributes of AST nodes are now set
as class attributes (e.g. Constant.kind is set to None).
2020-03-10 00:07:47 +02:00
Batuhan Taşkaya
d82e469048
bpo-39639: Remove the AST "Suite" node and associated code (GH-18513)
...
The AST "Suite" node is no longer used and it can be removed from the ASDL definition and related structures (compiler, visitors, ...).
Co-Authored-By: Victor Stinner <vstinner@python.org >
Co-authored-by: Brett Cannon <54418+brettcannon@users.noreply.github.com >
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com >
2020-03-04 16:16:46 +00:00
Brandt Bucher
d2f9667264
bpo-38823: Fix refleaks in _ast initialization error path (GH-17276)
2020-02-06 15:45:46 +01:00
Max Bernstein
bdac32e9fe
closes bpo-38648: Remove double tp_free slot in Python-ast.c. (GH-17002)
...
This looks like a typo due to copy-paste.
2019-10-30 18:08:06 -07:00
Dong-hee Na
a05fcd3c7a
bpo-38425: Fix ‘res’ may be used uninitialized warning (GH-16688)
2019-10-10 09:41:26 +02:00
Eddie Elizondo
3368f3c6ae
bpo-38140: Make dict and weakref offsets opaque for C heap types ( #16076 )
...
* Make dict and weakref offsets opaque for C heap types
* Add news
2019-09-19 17:29:05 +01:00
Eddie Elizondo
0247e80f3c
Fix leaks in Python-ast.c ( #16127 )
2019-09-14 14:38:17 +01:00
Dino Viehland
ac46eb4ad6
bpo-38113: Update the Python-ast.c generator to PEP384 (gh-15957)
...
Summary: This mostly migrates Python-ast.c to PEP384 and removes all statics from the whole file. This modifies the generator itself that generates the Python-ast.c. It leaves in the usage of _PyObject_LookupAttr even though it's not fully PEP384 compatible (this could always be shimmed in by anyone who needs it).
2019-09-11 18:16:34 +01:00
Serhiy Storchaka
43c9731334
bpo-38083: Minor improvements in asdl_c.py and Python-ast.c. (GH-15824)
...
* Use the const qualifier for constant C strings.
* Intern field and attribute names.
* Temporary incref a borrowed reference to a list item.
2019-09-10 03:02:30 -07:00
Pablo Galindo
cd6e83b481
bpo-37593: Swap the positions of posonlyargs and args in the constructor of ast.parameters nodes (GH-14778)
...
https://bugs.python.org/issue37593
2019-07-14 16:32:18 -07:00
Victor Stinner
022ac0a497
bpo-37253: Remove PyAST_obj2mod_ex() function (GH-14020)
...
PyAST_obj2mod_ex() is similar to PyAST_obj2mod() with an additional
'feature_version' parameter which is unused.
2019-06-13 09:18:45 +02:00
Jeroen Demeyer
530f506ac9
bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async (GH-13464)
...
Automatically replace
tp_print -> tp_vectorcall_offset
tp_compare -> tp_as_async
tp_reserved -> tp_as_async
2019-05-30 19:13:39 -07:00
Eric V. Smith
6f6ff8a565
bpo-37050: Remove expr_text from FormattedValue ast node, use Constant node 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.
2019-05-27 15:31:52 -04:00
Steve Dower
b82e17e626
bpo-36842: Implement PEP 578 (GH-12613)
...
Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.
2019-05-23 08:45:22 -07:00
Michael J. Sullivan
933e1509ec
bpo-36878: Track extra text added to 'type: ignore' in the AST (GH-13479)
...
GH-13238 made extra text after a # type: ignore accepted by the parser.
This finishes the job and actually plumbs the extra text through the
parser and makes it available in the AST.
2019-05-22 15:54:20 +01:00
Matthias Bussonnier
565b4f1ac7
bpo-34616: Add PyCF_ALLOW_TOP_LEVEL_AWAIT to allow top-level await (GH-13148)
...
Co-Authored-By: Yury Selivanov <yury@magic.io >
2019-05-21 16:12:02 -04:00
Eric V. Smith
9a4135e939
bpo-36817: Add f-string debugging using '='. (GH-13123)
...
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.
2019-05-08 16:28:48 -04:00