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-133194: Fix regression with PEP 758 parsing on older `feature_version` by sobolevn · Pull Request #133289 · python/cpython

Conversation

@sobolevn

@sobolevn sobolevn commented May 2, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

My previous change was not quite correct in two ways:

  • minor: missing "are" in the exception message
  • major: it stopped allowing parsing valid code like except TypeError: with older feature_versions :(

I added a lot more tests and fixed the problem (hopefully)! Reviews are highly appreciated 🙏

Fixes #133195
Fixes #133194
cc @cdce8p

  • Issue: PEP 758 changes do not have CHECK_VERSION guard for usage with ast.parse(..., feature_version=(3, 13)) #133194

Sorry, something went wrong.

Uh oh!

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

All reactions
@sobolevn
pythongh-133192: Fix regression with PEP 758 parsing on older `featur…
3d176ed
…e_version`
@sobolevn
sobolevn requested review from Eclips4, lysnikolaou and pablogsal as code owners May 2, 2025 10:47
@bedevere-app bedevere-app Bot added the awaiting core review label May 2, 2025
@sobolevn sobolevn changed the title gh-133192: Fix regression with PEP 758 parsing on older feature_version gh-133194: Fix regression with PEP 758 parsing on older feature_version May 2, 2025
@bedevere-app bedevere-app Bot mentioned this pull request May 2, 2025
PEP 758 changes do not have CHECK_VERSION guard for usage with ast.parse(..., feature_version=(3, 13)) #133194
Closed
@sobolevn sobolevn added the skip news label May 2, 2025
cdce8p
cdce8p approved these changes May 2, 2025
View reviewed changes

@cdce8p cdce8p left a comment

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.

LGTM! Thanks @sobolevn for picking this up so quickly 🙏🏻

Sorry, something went wrong.

Uh oh!

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

All reactions
lysnikolaou
lysnikolaou approved these changes May 2, 2025
View reviewed changes

@lysnikolaou lysnikolaou left a comment

Copy link
Copy Markdown
Member

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.

Yeah, this looks good to me! Missed it in the earlier PR. Surprised that the tests didn't catch it.

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels May 2, 2025
@sobolevn

sobolevn commented May 2, 2025

Copy link
Copy Markdown
Member Author

I will keep this open for a day, so maybe @pablogsal can also comment.

Thanks everyone 👍

All reactions

Sorry, something went wrong.

Uh oh!

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

Eclips4
Eclips4 approved these changes May 2, 2025
View reviewed changes
@sobolevn
sobolevn merged commit ca0a96d into python:main May 3, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label May 3, 2025
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
@sobolevn @Pranjal095
pythongh-133194: Fix regression with PEP 758 parsing on older `featur…
75e6788
…e_version` (python#133289)

pythongh-133192: Fix regression with PEP 758 parsing on older `feature_version`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@lysnikolaou lysnikolaou lysnikolaou approved these changes
@Eclips4 Eclips4 Eclips4 approved these changes
@pablogsal pablogsal Awaiting requested review from pablogsal pablogsal is a code owner
+1 more reviewer
@cdce8p cdce8p cdce8p approved these changes
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

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

PEP 758 changes do not have CHECK_VERSION guard for usage with ast.parse(..., feature_version=(3, 13))

Uh oh!

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

4 participants

@sobolevn @lysnikolaou @cdce8p @Eclips4
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.