GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-119562: Remove AST nodes deprecated since Python 3.8 by AlexWaygood · Pull Request #119563 · python/cpython

Conversation

@AlexWaygood

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

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Fixes #119562

  • Issue: Remove AST nodes deprecated since Python 3.8, with warnings since Python 3.12 #119562

📚 Documentation preview 📚: https://cpython-previews--119563.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@AlexWaygood
pythongh-119562: Remove AST nodes deprecated since Python 3.8
236b497
@AlexWaygood
AlexWaygood requested a review from isidentical as a code owner May 25, 2024 19:24
@bedevere-app bedevere-app Bot added the awaiting core review label May 25, 2024
@bedevere-app bedevere-app Bot mentioned this pull request May 25, 2024
Remove AST nodes deprecated since Python 3.8, with warnings since Python 3.12 #119562
Closed
@AlexWaygood AlexWaygood mentioned this pull request May 25, 2024
gh-90953: Emit deprecation warnings for ast features deprecated in Python 3.8 #104199
Merged
@AlexWaygood
unused imports
1d4634d
@AlexWaygood
AlexWaygood requested a review from hugovk May 25, 2024 19:50
hugovk
hugovk approved these changes May 25, 2024
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels May 25, 2024
AraHaan
AraHaan reviewed May 26, 2024
View reviewed changes
Comment thread Lib/ast.py
elif isinstance(value, AST):
self.visit(value)

def visit_Constant(self, node):

@AraHaan AraHaan May 26, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@AlexWaygood AlexWaygood May 26, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@AlexWaygood AlexWaygood May 26, 2024

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@AlexWaygood
Remove another thing from the tests and clarify whatsnew
40b5965
@AlexWaygood
AlexWaygood enabled auto-merge (squash) May 26, 2024 12:09
@AlexWaygood
Update 3.14.rst
757fedb
@AlexWaygood
AlexWaygood merged commit 008bc04 into python:main May 26, 2024
@AlexWaygood
AlexWaygood deleted the ast-removals branch May 26, 2024 12:34
@bedevere-app bedevere-app Bot removed the awaiting merge label May 26, 2024
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
@AlexWaygood @estyxx
pythongh-119562: Remove AST nodes deprecated since Python 3.8 (python…
9ca2e8c
…#119563)
luk1337 added a commit to luk1337/weechat that referenced this pull request Oct 30, 2024
@luk1337
tests: Migrate away from removed ast features
b67374e
See python/cpython#119563.
@luk1337 luk1337 mentioned this pull request Oct 30, 2024
tests: migrate away from removed ast features weechat/weechat#2204
Merged
luk1337 added a commit to luk1337/weechat that referenced this pull request Oct 30, 2024
@luk1337
tests: migrate away from removed ast features
9902469
See python/cpython#119563.
flashcode pushed a commit to weechat/weechat that referenced this pull request Nov 4, 2024
@luk1337 @flashcode
tests: migrate away from removed ast features
9731f5a
See python/cpython#119563.
flashcode pushed a commit to weechat/weechat that referenced this pull request Nov 4, 2024
@luk1337 @flashcode
tests: migrate away from removed ast features
c079852
See python/cpython#119563.
This was referenced Jul 24, 2025
Documentation indicates presence of removed ast members #137063
Closed
Not compatible with Python 3.14 xZise/flake8-future-import#27
Open
@dancollins dancollins mentioned this pull request Nov 9, 2025
Python 3.14 sort is broken due to import microsoft/vscode-isort#479
Closed
@bergentroll bergentroll mentioned this pull request Feb 5, 2026
Fix for Python 3.14 virtualvinodh/aksharamukha-python#30
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@hugovk hugovk hugovk approved these changes
@isidentical isidentical Awaiting requested review from isidentical isidentical is a code owner
+1 more reviewer
@AraHaan AraHaan AraHaan left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

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

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@AlexWaygood @hugovk @AraHaan
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.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.