-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-60191: Implement ast.compare #19211
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
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
cfb508f
bpo-15987: Implement ast.compare
isidentical 0441023
unwrap ifs a level
isidentical 9572173
Merge branch 'main' into bpo-15987
AlexWaygood 52f428e
A few revision to clarify some subtleties of comparing AST objects.
jeremyhylton e47fb0b
Merge remote-tracking branch 'upstream/main' into pr_19211
jeremyhylton 5f37b91
Remove the compare_fields option.
jeremyhylton c0bb0e9
Revise docstring and documentation for consistency.
jeremyhylton 13fbbc9
This PR now describes a feature of 3.14. Revise what's new / news docs.
jeremyhylton f8f0747
Update 3.9.rst
jeremyhylton deca2da
Remove the compare_types option, which seems unnecessary.
jeremyhylton 7788744
Update Doc/whatsnew/3.14.rst
jeremyhylton 05885de
Update Doc/whatsnew/3.14.rst
jeremyhylton 3b7192e
Remove compare_types from doc. Change ast node to AST.
jeremyhylton b9b6c45
Change AST node to AST.
jeremyhylton c9aa69e
Merge remote-tracking branch 'upstream/main' into pr_19211
jeremyhylton adc2718
Merge branch 'bpo-15987' into pr_19211
jeremyhylton 0c72337
One more change of "ast nodes" to "ASTs"
jeremyhylton 6ad21c0
Merge AST comparison into the test for AST validation.
jeremyhylton ec8af39
Merge tests for AST parsing and comparison.
jeremyhylton c7ea190
Merge branch 'main' into bpo-15987
jeremyhylton 75ba002
Improve description of compare_attributes arg
jeremyhylton 5b01405
AP style: Spell out numbers under 10
jeremyhylton 69be6d2
Improve description of compare_attributes arg
jeremyhylton bdd2d66
Improve robustness of compare() in the face of user-modification of AST.
jeremyhylton f9d4c39
Update Lib/test/test_ast.py
jeremyhylton ed0cddd
Update Lib/test/test_ast.py
jeremyhylton 2b114a9
Update Lib/test/test_ast.py
jeremyhylton 4687dc6
Update Lib/test/test_ast.py
jeremyhylton 455bdb1
whitespace
iritkatriel af70707
Merge branch 'main' into bpo-15987
jeremyhylton b915d9c
Merge branch 'main' into bpo-15987
jeremyhylton ccf410c
Update Doc/library/ast.rst
jeremyhylton 06988c1
Update Lib/ast.py
jeremyhylton 0c9da18
Attributes are ints not strings.
jeremyhylton 6494c23
Explain examples of what are included in attributes.
jeremyhylton bf9e403
Update Doc/library/ast.rst
jeremyhylton f34dcac
Merge branch 'main' into bpo-15987
jeremyhylton d2281f5
Merge branch 'main' into bpo-15987
jeremyhylton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
Misc/NEWS.d/next/Library/2020-03-28-21-00-54.bpo-15987.aBL8XS.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Implemented :func:`ast.compare` for comparing two ASTs. Patch by Batuhan | ||
Taskaya with some help from Jeremy Hylton. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.