Skip to content

Compiler should not need to know how to construct AST nodes #123881

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
iritkatriel opened this issue Sep 9, 2024 · 1 comment · Fixed by #123883
Closed

Compiler should not need to know how to construct AST nodes #123881

iritkatriel opened this issue Sep 9, 2024 · 1 comment · Fixed by #123883
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-typing

Comments

@iritkatriel
Copy link
Member

iritkatriel commented Sep 9, 2024

There is one place in the compiler where it copies a bit of AST and modifies it to add a base class to generic classes.
It would be nice if the compiler didn't need to know how to do this.

Linked PRs

@iritkatriel iritkatriel added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Sep 9, 2024
@sobolevn
Copy link
Member

sobolevn commented Sep 9, 2024

cc @JelleZijlstra who implemented PEP695

@iritkatriel iritkatriel changed the title Compiler should not modify the AST Compiler should not need to know how to construct AST nodes Sep 9, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Sep 10, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Sep 10, 2024
JelleZijlstra added a commit that referenced this issue Sep 10, 2024
…GH-123886) (#123891)

gh-123881: Add additional test coverage for PEP 695 edge cases (GH-123886)
(cherry picked from commit b52de7e)

Co-authored-by: Jelle Zijlstra <[email protected]>
Yhg1s pushed a commit that referenced this issue Sep 30, 2024
…GH-123886) (#123890)

gh-123881: Add additional test coverage for PEP 695 edge cases (GH-123886)
(cherry picked from commit b52de7e)

Co-authored-by: Jelle Zijlstra <[email protected]>
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) topic-typing
Projects
None yet
2 participants