[issue44201] REPL requests another line despite syntax error

2021-05-22 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 1fb6b9e91d8685f7eca0fc33402589c65723bd94 by Miss Islington (bot) in branch '3.10': bpo-44201: Avoid side effects of "invalid_*" rules in the REPL (GH-26298) (GH-26313) https://github.com/python/cpython/commit/1fb6b9e91d8685f7eca0fc334025

[issue44201] REPL requests another line despite syntax error

2021-05-22 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44201] REPL requests another line despite syntax error

2021-05-22 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +24911 pull_request: https://github.com/python/cpython/pull/26313 ___ Python tracker _

[issue44201] REPL requests another line despite syntax error

2021-05-21 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +24901 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26298 ___ Python tracker __

[issue44201] REPL requests another line despite syntax error

2021-05-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Yes, I was exactly working in that :) -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue44201] REPL requests another line despite syntax error

2021-05-21 Thread Guido van Rossum
Guido van Rossum added the comment: Could we implement something in the REPL where it refuses to read another line when asked for a token in an error recovery rule? -- ___ Python tracker

[issue44201] REPL requests another line despite syntax error

2021-05-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I will try to see if we can do something about this but the only thing I can think of is removing the lookaheads in the invalid comparison rules but then we need to solve the false positives (like keyword arguments) and that's going to be very hard to

[issue44201] REPL requests another line despite syntax error

2021-05-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: No, this issue is in the parser while the other is caused by the code module. As I mentioned, this case doesn't ask you for tokens until you close the brace, it just ask you for one extra token because is doing a lookahead. If you give any extra token

[issue44201] REPL requests another line despite syntax error

2021-05-21 Thread Andre Roberge
Andre Roberge added the comment: I believe that this is similar to, but not quite as severe as a similar bug in code.interact() https://bugs.python.org/issue43366 which affects IDLE; perhaps fixing this might fix the other issue? -- nosy: +aroberge __

[issue44201] REPL requests another line despite syntax error

2021-05-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Unfortunately this happens because to generate the error message we check for the equal and the right hand side of the equal (to also discard some false positives) and this triggers the parser to ask for additional tokens. Notice that you don't need t

[issue44201] REPL requests another line despite syntax error

2021-05-20 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +lys.nikolaou, pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44201] REPL requests another line despite syntax error

2021-05-20 Thread Guido van Rossum
Change by Guido van Rossum : -- keywords: +3.10regression ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue44201] REPL requests another line despite syntax error

2021-05-20 Thread Guido van Rossum
New submission from Guido van Rossum : This seems a regression from 3.9. >>> foo[x = 1 ... ] File "", line 1 foo[x = 1 ^ SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='? >>> Note how the syntax error is in line 1 and yet the REPL asks for more input