bpo-42864: Improve error messages regarding unclosed parentheses #24161
Conversation
|
I opened this as a draft to evaluate the idea. This probably needs #24140 to be fixed first for the tests to pass |
|
cc: @asottile |
823ba3e
to
83572fc
|
@lysnikolaou Do you mind taking a look at this when you have some time? I hope we can find some way to make this work |
| @@ -160,7 +160,6 @@ def test_incomplete(self): | |||
| ai("","eval") | |||
| ai("\n","eval") | |||
| ai("(","eval") | |||
| ai("(\n\n\n","eval") | |||
pablogsal
Jan 14, 2021
•
Author
Member
The EOF was reached in a different line before but now it raises the same error as the case without newlines (because the unopen parentheses are at the same place). I think we can allow that to happen.
The EOF was reached in a different line before but now it raises the same error as the case without newlines (because the unopen parentheses are at the same place). I think we can allow that to happen.
2a7d535
to
b5bfa50
|
I would like this PR to be exposed as soon as possible to new users testing 3.10 so we can find as many problems with this as possible (if there are any), given that this actively exercises the code added in #24140. If nobody can review this by the end of the week I would like to go ahead and land it and we can tweak it later unless someone has concerns with this. |
|
I'm so sorry for not replying sooner. I got distracted by other stuff and forgot about this. I'll find some time to review it by Wednesday evening. I hope that's okay and sorry again. |
Absolutely! Don't worry, I totally understand and there is no problem. Also, don't feel pressured to review this if you don't have time. I wrote the message in case that nobody has time to review this in the short term because I wanted some early exposure for this :) Also, tell me if you need more time to go through this and I can hold it for more time |
|
LGTM! Do the Windows warnings bother us or is it okay to merge with those? |
I would merge and then investigate the proper way to fix it. It probably requires a cast or changing the type of the parent stack but maybe it requires changes somewhere else due to type inconsistency across these fields and I prefer to investigate separately if that's ok with you :) |
Yup. Go! |
d6d6371
into
python:master
Let's see how many weird edge cases we found after this |
https://bugs.python.org/issue42864
With this PR: