10000 gh-116022: Improve `repr()` of AST nodes by tomasr8 · Pull Request #117046 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-116022: Improve repr() of AST nodes #117046

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 39 commits into from
Sep 18, 2024
Merged
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
7461655
Improve repr() of AST nodes
tomasr8 Mar 11, 2024
447261b
Add news entry
tomasr8 Mar 19, 2024
74759bc
Improve news entry
tomasr8 Mar 20, 2024
4ffc1fb
Follow PEP7
tomasr8 Mar 20, 2024
6094100
Fix test
tomasr8 Mar 20, 2024
5cde4fc
Regenerate files
tomasr8 Mar 20, 2024
00133b8
Merge branch 'main' into ast-repr
JelleZijlstra Apr 24, 2024
e1b7643
Fix missing whitespace
tomasr8 May 2, 2024
0308982
Check return values
tomasr8 May 2, 2024
3f2bf3f
Check for retval < 0 rather than == -1
tomasr8 May 2, 2024
4386a5a
Fix missing whitespace
tomasr8 May 2, 2024
af3b2a3
Simplify code
tomasr8 May 2, 2024
1aaa1c0
Update Parser/asdl_c.py
JelleZijlstra Jun 3, 2024
06e4657
Merge branch 'main' into ast-repr
AlexWaygood Jun 3, 2024
df70943
Fix leaked references
tomasr8 Jul 10, 2024
ed89975
Add an assertion
tomasr8 Jul 10, 2024
d8b3bff
Simplify code
tomasr8 Jul 10, 2024
cfd6cdf
Add tests
tomasr8 Jul 10, 2024
f022378
Use PyUnicodeWriter instead of string concatenation
tomasr8 Jul 11, 2024
0f916cc
Improve news entry
tomasr8 Jul 11, 2024
e2b0415
PEP7 fixes
tomasr8 Jul 11, 2024
9f405ac
Merge branch 'main' into ast-repr
tomasr8 Jul 11, 2024
b06c8a4
Use the public Unicode Writer API where possible
tomasr8 Jul 11, 2024
32a5169
Increase max depth to 3
tomasr8 Jul 11, 2024
7603910
Add comments
tomasr8 Jul 11, 2024
74c57a6
Add versionchanged note to ast module docs
tomasr8 Jul 11, 2024
ddd7e71
Use `PyUnicodeWriter_WriteUTF8`
tomasr8 Jul 14, 2024
132932a
Check for errors
tomasr8 Jul 14, 2024
a341c57
Use snapshots for testing
tomasr8 Jul 14, 2024
d03c3d1
Fix typo
tomasr8 Jul 14, 2024
44b3303
Add test folder to Makefile
tomasr8 Jul 14, 2024
0b52a65
Switch back to the private API
tomasr8 Jul 16, 2024
0b19d2e
Merge branch 'main' into ast-repr
tomasr8 Aug 3, 2024
2ed3f99
Move test data inside test_ast
tomasr8 Aug 12, 2024
c94c197
Merge branch 'main' into ast-repr
tomasr8 Aug 12, 2024
6ca6b5b
Fix tests
tomasr8 Aug 14, 2024
df34a04
Apply review suggestions
tomasr8 Aug 14, 2024
ab823cc
Merge branch 'main' into ast-repr
tomasr8 Sep 17, 2024
abd35b0
Merge branch 'main' into ast-repr
JelleZijlstra Sep 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add versionchanged note to ast module docs
  • Loading branch information
tomasr8 committed Jul 11, 2024
commit 74c57a6c20b7fde3ccb1b8068f297ffb4576e0e6
5 changes: 5 additions & 0 deletions Doc/library/ast.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ Node classes
Simple indices are represented by their value, extended slices are
represented as tuples.

.. versionchanged:: 3.14

The :meth:`~object.__repr__` output of :class:`~ast.AST` nodes includes
the values of the node fields.

.. deprecated:: 3.8

Old classes :class:`!ast.Num`, :class:`!ast.Str`, :class:`!ast.Bytes`,
Expand Down
Loading
0