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-117486: Improve behavior for user-defined AST subclasses by JelleZijlstra · Pull Request #118212 · python/cpython

Conversation

@JelleZijlstra

@JelleZijlstra JelleZijlstra commented Apr 24, 2024 •
edited by github-actions Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Now, such classes will no longer require changes in Python 3.13 in the normal case.
The test suite for robotframework passes with no DeprecationWarnings under this PR.

I also added a new DeprecationWarning for the case where _field_types exists
but is incomplete, since that seems likely to indicate a user mistake.

Closes #117486

  • Issue: ast: Improve behavior for user-defined classes #117486

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

Sorry, something went wrong.

Uh oh!

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

All reactions
@JelleZijlstra
pythongh-117486: Improve behavior for user-defined AST subclasses
ff62a21
Now, such classes will no longer require changes in Python 3.13 in the normal case.
The test suite for robotframework passes with no DeprecationWarnings under this PR.

I also added a new DeprecationWarning for the case where `_field_types` exists
but is incomplete, since that seems likely to indicate a user mistake.
@JelleZijlstra
JelleZijlstra requested a review from encukou April 24, 2024 04:28
@JelleZijlstra
JelleZijlstra requested a review from isidentical as a code owner April 24, 2024 04:28
@bedevere-app bedevere-app Bot mentioned this pull request Apr 24, 2024
ast: Improve behavior for user-defined classes #117486
Closed
@bedevere-app bedevere-app Bot added the awaiting core review label Apr 24, 2024
@JelleZijlstra JelleZijlstra added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Apr 24, 2024
@bedevere-bot

bedevere-bot commented Apr 24, 2024

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @JelleZijlstra for commit ff62a21 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Apr 24, 2024
JelleZijlstra added 2 commits May 6, 2024 06:49
@JelleZijlstra
Merge branch 'main' into ast2
0843bc6
@JelleZijlstra
fix doctest
cf6ac37
@JelleZijlstra

JelleZijlstra commented May 6, 2024

Copy link
Copy Markdown
Member Author

I'm planning to merge this today so we can be in a better place for beta 1.

All reactions

Sorry, something went wrong.

Uh oh!

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

@JelleZijlstra
JelleZijlstra merged commit e042219 into python:main May 6, 2024
@bedevere-app bedevere-app Bot removed the awaiting core review label May 6, 2024
@JelleZijlstra
JelleZijlstra deleted the ast2 branch May 6, 2024 22:57
SonicField pushed a commit to SonicField/cpython that referenced this pull request May 8, 2024
@JelleZijlstra @SonicField
pythongh-117486: Improve behavior for user-defined AST subclasses (py…
ca5a109
…thon#118212)

Now, such classes will no longer require changes in Python 3.13 in the normal case.
The test suite for robotframework passes with no DeprecationWarnings under this PR.

I also added a new DeprecationWarning for the case where `_field_types` exists
but is incomplete, since that seems likely to indicate a user mistake.
@JelleZijlstra JelleZijlstra mentioned this pull request May 24, 2024
SystemError: <method-wrapper '__init__' of ast.AST-child object at ...> returned NULL without setting an exception #117266
Closed
@JelleZijlstra
JelleZijlstra restored the ast2 branch September 10, 2024 23:37
@terryjreedy terryjreedy mentioned this pull request Jun 22, 2025
ast.class._field_types causes Exception when ast.class._fields does not cause Exception #135797
Open
@colesbury colesbury mentioned this pull request Oct 22, 2025
global-buffer-overflow PyUnicode_GET_LENGTH cpython/unicodeobject.h #140471
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@encukou encukou Awaiting requested review from encukou
@isidentical isidentical Awaiting requested review from isidentical

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.

ast: Improve behavior for user-defined classes

Uh oh!

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

2 participants

@JelleZijlstra @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.