FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-119562: Remove AST nodes deprecated since Python 3.8 by AlexWaygood · Pull Request #119563 · python/cpython · GitHub

/ cpython Public

gh-119562: Remove AST nodes deprecated since Python 3.8 - #119563

Merged
AlexWaygood merged 4 commits into
python:mainfrom
AlexWaygood:ast-removals
May 26, 2024
Merged

gh-119562: Remove AST nodes deprecated since Python 3.8#119563
AlexWaygood merged 4 commits into
python:mainfrom
AlexWaygood:ast-removals

Conversation

AlexWaygood commented May 25, 2024
edited by github-actions Bot
Loading

Copy link
Copy Markdown
Member

AlexWaygood requested a review from hugovk May 25, 2024 19:50
Comment thread Lib/ast.py
elif isinstance(value, AST):
self.visit(value)

def visit_Constant(self, node):

AraHaan May 26, 2024
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Uh I think you accidentally removed this. Above said to use this. 😄

AlexWaygood May 26, 2024
edited
Loading

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I deliberately removed it. It will still work if you define visit_Constant on a custom subclass of ast.NodeVisitor. The reason why it is currently defined on ast.NodeVisitor itself — uniquely among the visit_* methods — is to ensure that the deprecated methods visit_Num, visit_Str, etc. continue to work if you define them on a subclass of ast.NodeVisitor.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I tried to clarify this a bit in 40b5965 -- hopefully that helps!

AlexWaygood enabled auto-merge (squash) May 26, 2024 12:09
AlexWaygood merged commit 008bc04 into python:main May 26, 2024
AlexWaygood deleted the ast-removals branch May 26, 2024 12:34
luk1337 added a commit to luk1337/weechat that referenced this pull request Oct 30, 2024
luk1337 added a commit to luk1337/weechat that referenced this pull request Oct 30, 2024
flashcode pushed a commit to weechat/weechat that referenced this pull request Nov 4, 2024
flashcode pushed a commit to weechat/weechat that referenced this pull request Nov 4, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove AST nodes deprecated since Python 3.8, with warnings since Python 3.12

3 participants


Back | FazBrowse Home | New Git URL