[issue42827] pegen parser: Multiline eval with assignment to function call: assertion failed

2021-01-14 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

In order to test code.InteractiveCompiler (used by IDLE) and 
codeop._maybe_compile (which IC calls), which calls compile() 3 times with mode 
'single', I entered the example as 2 or 3 lines in Shell.
>>> [file for str(file) in []  # Error highlight on 's'.
 ]
SyntaxError: cannot assign to function call

Breaking the expression elsewhere, including before 'str', gives the same 
message and highlighted 's'.

I did not test before recompiling but it is certainly correct now.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42827] pegen parser: Multiline eval with assignment to function call: assertion failed

2021-01-14 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

On Windows, Victor's one liner failed on repository debug builds with Windows' 
process error popup.  I have seen this mysterious failure at least once when 
testing IDLE Shell running on the repository build.   After the patch, my debug 
build gives the correct message,
  SyntaxError: cannot assign to function call
and correctly points to the 's' of 'str' on the first line.  Ditto when run 
from IDLE's Shell or editor.  Thank you for the fix.

Installed Python 3.10.0a4, Jan 4, gives the correct message  but confusingly 
points at the final ']' on a line by itself.  The latter should be fixed in the 
next release.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42827] pegen parser: Multiline eval with assignment to function call: assertion failed

2021-01-14 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

This is now fixed.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42827] pegen parser: Multiline eval with assignment to function call: assertion failed

2021-01-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset e5fe509054183bed9aef42c92da8407d339e8af8 by Lysandros Nikolaou in 
branch 'master':
bpo-42827: Fix crash on SyntaxError in multiline expressions (GH-24140)
https://github.com/python/cpython/commit/e5fe509054183bed9aef42c92da8407d339e8af8


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42827] pegen parser: Multiline eval with assignment to function call: assertion failed

2021-01-06 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests: +22969
pull_request: https://github.com/python/cpython/pull/24140

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42827] pegen parser: Multiline eval with assignment to function call: assertion failed

2021-01-05 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests: +22954
pull_request: https://github.com/python/cpython/pull/24124

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42827] pegen parser: Multiline eval with assignment to function call: assertion failed

2021-01-04 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +22936
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/24107

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42827] pegen parser: Multiline eval with assignment to function call: assertion failed

2021-01-04 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

Thanks for letting us know, Julien! I've identified the bug and where it comes 
from and I'll probably work on it tomorrow.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42827] pegen parser: Multiline eval with assignment to function call: assertion failed

2021-01-04 Thread Julien Palard


Julien Palard  added the comment:

According to git bisect it come from 01ece63d42b830df106948db0aefa6c1ba24416a, 
thanks Victor for adding Lysandros, you had a good feeling :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42827] pegen parser: Multiline eval with assignment to function call: assertion failed

2021-01-04 Thread STINNER Victor


Change by STINNER Victor :


--
title: Multiline eval with assignment to function call segfaults -> pegen 
parser: Multiline eval with assignment to function call:  assertion failed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com