Skip to content

gh-85260: Extend the AST Validator to validate all identifiers - #21069

Merged
serhiy-storchaka merged 3 commits into
python:mainfrom
isidentical:bpo-41088
Aug 13, 2026
Merged

gh-85260: Extend the AST Validator to validate all identifiers#21069
serhiy-storchaka merged 3 commits into
python:mainfrom
isidentical:bpo-41088

Conversation

@isidentical

@isidentical isidentical commented Jun 23, 2020

Copy link
Copy Markdown
Member

Comment thread Python/ast.c
static int
validate_name(PyObject *name)
validate_name(const char* owner, PyObject *name)
{

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In validate_name owner is the first arg and in validate_import_names it is the last arg.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Other arguments besides owner are different in validate_name() and validate_import_names(), so I do not see a problem here.

@furkanonder

Copy link
Copy Markdown
Contributor

@isidentical Could you resolve the conflicts?

@iritkatriel iritkatriel added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Nov 23, 2023

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Please resolve conflicts.

Comment thread Python/ast.c
static int
validate_name(PyObject *name)
validate_name(const char* owner, PyObject *name)
{

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Other arguments besides owner are different in validate_name() and validate_import_names(), so I do not see a problem here.

@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 8, 2026
# Conflicts:
#	Lib/test/test_ast.py
#	Misc/NEWS.d/next/Core_and_Builtins/2020-06-23-13-59-37.bpo-41088.o_LJ76.rst
#	Python/ast.c
@serhiy-storchaka serhiy-storchaka changed the title bpo-41088: Extend the AST Validator to validate all identifiers gh-85260: Extend the AST Validator to validate all identifiers Aug 12, 2026
The change is for pythongh-85260 (bpo-41088), not pythongh-85270 (bpo-41098).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@serhiy-storchaka
serhiy-storchaka merged commit 47e2175 into python:main Aug 13, 2026
59 checks passed
@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes and removed stale Stale PR or inactive for long period of time. labels Aug 13, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @isidentical for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @isidentical for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @isidentical for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington-app

Copy link
Copy Markdown

Sorry, @isidentical and @serhiy-storchaka, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 47e21752b550f1715ec25547fd326fac8d675a96 3.13

@bedevere-app

bedevere-app Bot commented Aug 13, 2026

Copy link
Copy Markdown

GH-155651 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Aug 13, 2026
@bedevere-app

bedevere-app Bot commented Aug 13, 2026

Copy link
Copy Markdown

GH-155652 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Aug 13, 2026
@bedevere-app

bedevere-app Bot commented Aug 13, 2026

Copy link
Copy Markdown

GH-155653 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Aug 13, 2026
serhiy-storchaka pushed a commit that referenced this pull request Aug 13, 2026
…GH-21069) (GH-155651)

(cherry picked from commit 47e2175)

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
serhiy-storchaka added a commit that referenced this pull request Aug 13, 2026
…GH-21069) (GH-155653)

(cherry picked from commit 47e2175)

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

interpreter-core (Objects, Python, Grammar, and Parser dirs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants