Skip to content

Add _PyErr_RaiseSyntaxError and _PyErr_EmitSyntaxWarning #123969

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 11, 2024 · 0 comments · Fixed by #123972
Closed

Add _PyErr_RaiseSyntaxError and _PyErr_EmitSyntaxWarning #123969

iritkatriel opened this issue Sep 11, 2024 · 0 comments · Fixed by #123972
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@iritkatriel
Copy link
Member

iritkatriel commented Sep 11, 2024

The _PyCompile_Error and _PyCompile_Warn functions take a compiler struct as parameter, just for the filename. In order to be able to use these functions from areas of the codebase where this does not exist, we need versions that take just the filename.

I think they should live in Python/errors.py, with _PyErr_ prefix.

Linked PRs

@iritkatriel iritkatriel self-assigned this Sep 11, 2024
@iritkatriel iritkatriel added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Sep 11, 2024
iritkatriel added a commit to iritkatriel/cpython that referenced this issue Sep 11, 2024
savannahostrowski pushed a commit to savannahostrowski/cpython that referenced this issue Sep 22, 2024
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
1 participant