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-90953: Don't use deprecated AST nodes in clinic.py by AlexWaygood · Pull Request #104322 · python/cpython

Conversation

@AlexWaygood

@AlexWaygood AlexWaygood commented May 9, 2023 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Following 376137f, usage of ast.Num and ast.Str causes DeprecationWarnings to be emitted. This PR updates clinic.py to use the newer AST nodes, avoiding deprecation warnings when running test_clinic.py.

It looks like this script currently takes pains so that it can maintain compatibility with older Python versions. This change means that it won't be possible to run it on Python 3.7 anymore, but Python 3.7 is nearly end-of-life now anyway.

  • Issue: ast.Constant.n deprecated without warning #90953

Sorry, something went wrong.

Uh oh!

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

All reactions
@AlexWaygood
pythongh-90953: Don't use deprecated AST nodes in clinic.py
d8d0ae6
@AlexWaygood
AlexWaygood requested a review from erlend-aasland May 9, 2023 12:40
@bedevere-bot bedevere-bot mentioned this pull request May 9, 2023
ast.Constant.n deprecated without warning #90953
Closed
@bedevere-bot bedevere-bot added the awaiting core review label May 9, 2023
@AlexWaygood AlexWaygood added the skip news label May 9, 2023
@sunmy2019

sunmy2019 commented May 9, 2023

Copy link
Copy Markdown
Member

LGTM

AlexWaygood and erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland

erlend-aasland commented May 9, 2023

Copy link
Copy Markdown
Contributor

I think it is fine to require Python 3.8 for clinic.py. Argument Clinic is for CPython development, and its primary purpose is to generate code for this repo. Third party projects may use it, but must do so completely at their own risk.

AlexWaygood reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

erlend-aasland
erlend-aasland approved these changes May 9, 2023
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels May 9, 2023
@AlexWaygood
AlexWaygood merged commit fe694a6 into python:main May 9, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label May 9, 2023
@AlexWaygood
AlexWaygood deleted the clinic-deprecation branch May 9, 2023 21:16
@AlexWaygood

AlexWaygood commented May 9, 2023

Copy link
Copy Markdown
Member Author

Thanks both!

erlend-aasland and sunmy2019 reacted with hooray emoji
All reactions
  • 🎉 2 reactions

Sorry, something went wrong.

Uh oh!

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

carljm added a commit to carljm/cpython that referenced this pull request May 10, 2023
@carljm
Merge branch 'main' into fixloadsuperspec
5976df9
* main:
  pythonGH-102181: Improve specialization stats for SEND (pythonGH-102182)
  pythongh-103000: Optimise `dataclasses.asdict` for the common case (python#104364)
  pythongh-103538: Remove unused TK_AQUA code (pythonGH-103539)
  pythonGH-87695: Fix OSError from `pathlib.Path.glob()` (pythonGH-104292)
  pythongh-104263: Rely on Py_NAN and introduce Py_INFINITY (pythonGH-104202)
  pythongh-104010: Separate and improve docs for `typing.get_origin` and `typing.get_args` (python#104013)
  pythongh-101819: Adapt _io._BufferedIOBase_Type methods to Argument Clinic (python#104355)
  pythongh-103960: Dark mode: invert image brightness (python#103983)
  pythongh-104252: Immortalize Py_EMPTY_KEYS (pythongh-104253)
  pythongh-101819: Clean up _io windows console io after pythongh-104197 (python#104354)
  pythongh-101819: Harden _io init (python#104352)
  pythongh-103247: clear the module cache in a test in test_importlib/extensions/test_loader.py (pythonGH-104226)
  pythongh-103848: Adds checks to ensure that bracketed hosts found by urlsplit are of IPv6 or IPvFuture format (python#103849)
  pythongh-74895: adjust tests to work on Solaris (python#104326)
  pythongh-101819: Refactor _io in preparation for module isolation (python#104334)
  pythongh-90953: Don't use deprecated AST nodes in clinic.py (python#104322)
  pythongh-102327: Extend docs for "url" and "headers" parameters to HTTPConnection.request()
  pythongh-104328: Fix typo in ``typing.Generic`` multiple inheritance error message (python#104335)
@AlexWaygood AlexWaygood mentioned this pull request May 12, 2023
gh-104050: Run mypy on clinic.py in CI #104421
Merged
@ambv ambv added needs backport to 3.9 needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Oct 31, 2025
@miss-islington-app

miss-islington-app Bot commented Oct 31, 2025

Copy link
Copy Markdown

Thanks @AlexWaygood for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington-app

miss-islington-app Bot commented Oct 31, 2025

Copy link
Copy Markdown

Thanks @AlexWaygood for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington-app

miss-islington-app Bot commented Oct 31, 2025

Copy link
Copy Markdown

Thanks @AlexWaygood for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington-app

miss-islington-app Bot commented Oct 31, 2025

Copy link
Copy Markdown

Thanks @AlexWaygood for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 31, 2025
@AlexWaygood @miss-islington
pythongh-90953: Don't use deprecated AST nodes in clinic.py (pythonGH…
eaf62ab
…-104322)

(cherry picked from commit fe694a6)

Co-authored-by: Alex Waygood <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 31, 2025
@AlexWaygood @miss-islington
pythongh-90953: Don't use deprecated AST nodes in clinic.py (pythonGH…
e8cd18d
…-104322)

(cherry picked from commit fe694a6)

Co-authored-by: Alex Waygood <[email protected]>
@bedevere-app

bedevere-app Bot commented Oct 31, 2025

Copy link
Copy Markdown

GH-140854 is a backport of this pull request to the 3.9 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.9 label Oct 31, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 31, 2025
@AlexWaygood @miss-islington
pythongh-90953: Don't use deprecated AST nodes in clinic.py (pythonGH…
1e8f2e7
…-104322)

(cherry picked from commit fe694a6)

Co-authored-by: Alex Waygood <[email protected]>
@miss-islington-app

miss-islington-app Bot commented Oct 31, 2025

Copy link
Copy Markdown

Sorry, @AlexWaygood, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker fe694a6db620062f467469bd2bb987315d72fd62 3.12
All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington-app miss-islington-app Bot assigned AlexWaygood Oct 31, 2025
@bedevere-app

bedevere-app Bot commented Oct 31, 2025

Copy link
Copy Markdown

GH-140855 is a backport of this pull request to the 3.10 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.10 label Oct 31, 2025
@bedevere-app

bedevere-app Bot commented Oct 31, 2025

Copy link
Copy Markdown

GH-140856 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.11 only security fixes label Oct 31, 2025
@ambv ambv removed the needs backport to 3.12 only security fixes label Oct 31, 2025
ambv pushed a commit that referenced this pull request Oct 31, 2025
@miss-islington @AlexWaygood
[3.10] gh-90953: Don't use deprecated AST nodes in clinic.py (GH-104322…
9524203
…) (GH-140855)

(cherry picked from commit fe694a6)

Co-authored-by: Alex Waygood <[email protected]>
ambv pushed a commit that referenced this pull request Oct 31, 2025
@miss-islington @AlexWaygood
[3.9] gh-90953: Don't use deprecated AST nodes in clinic.py (GH-104322)…
fde6ac1
… (GH-140854)

(cherry picked from commit fe694a6)

Co-authored-by: Alex Waygood <[email protected]>
ambv pushed a commit that referenced this pull request Oct 31, 2025
@miss-islington @AlexWaygood
[3.11] gh-90953: Don't use deprecated AST nodes in clinic.py (GH-104322…
20fe182
…) (GH-140856)

(cherry picked from commit fe694a6)

Co-authored-by: Alex Waygood <[email protected]>
@AlexWaygood AlexWaygood removed their assignment Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@erlend-aasland erlend-aasland erlend-aasland approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

5 participants

@AlexWaygood @sunmy2019 @erlend-aasland @ambv @bedevere-bot
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 01402503 — 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.