Skip to content
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

[3.9] bpo-38964: Print correct filename on a SyntaxError in an fstring (GH-20399) #20404

Merged
merged 1 commit into from
May 26, 2020

Conversation

lysnikolaou
Copy link
Contributor

@lysnikolaou lysnikolaou commented May 26, 2020

When a SyntaxError in the expression part of a fstring is found,
the filename attribute of the SyntaxError is always <fstring>.
With this commit, it gets changed to always have the name of the file
the fstring resides in.

Co-authored-by: Pablo Galindo [email protected].
(cherry picked from commit f7b1e46)

Co-authored-by: Lysandros Nikolaou [email protected]

https://bugs.python.org/issue38964

pythonGH-20399)

When a `SyntaxError` in the expression part of a fstring is found,
the filename attribute of the `SyntaxError` is always `<fstring>`.
With this commit, it gets changed to always have the name of the file
the fstring resides in.

Co-authored-by: Pablo Galindo <[email protected]>.
(cherry picked from commit f7b1e46)

Co-authored-by: Lysandros Nikolaou <[email protected]>
@lysnikolaou
Copy link
Contributor Author

Closing and reopening for the CI to re-run.

@lysnikolaou lysnikolaou reopened this May 26, 2020
@pablogsal pablogsal merged commit 791a46e into python:3.9 May 26, 2020
@lysnikolaou lysnikolaou deleted the backport-f7b1e46-3.9 branch May 27, 2020 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants