This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author aroberge
Recipients aroberge, lys.nikolaou, pablogsal
Date 2021-11-16.00:47:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1637023663.78.0.877430736208.issue45812@roundup.psfhosted.org>
In-reply-to
Content
In the following, I execute a single invalid statement in the Python interpreter, which gives the correct error message. Afterwards, I repeat this example using code.interact(), generating a different traceback. This issue affects IDLE differently as shown in the attached file: the statement is never considered to be complete.

===
Python 3.11.0a2 (tags/v3.11.0a2:e2b4e4b, Nov  5 2021, 20:00:05) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> a = 3 \ 4
  File "<stdin>", line 1
    a = 3 \ 4
            ^
SyntaxError: unexpected character after line continuation character
>>> import code
>>> code.interact()
Python 3.11.0a2 (tags/v3.11.0a2:e2b4e4b, Nov  5 2021, 20:00:05) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> a = 3 \ 4
...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\andre\AppData\Local\Programs\Python\Python311\lib\code.py", line 301, in interact
    console.interact(banner, exitmsg)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\andre\AppData\Local\Programs\Python\Python311\lib\code.py", line 232, in interact
    more = self.push(line)
           ^^^^^^^^^^^^^^^
  File "C:\Users\andre\AppData\Local\Programs\Python\Python311\lib\code.py", line 258, in push
    more = self.runsource(source, self.filename)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\andre\AppData\Local\Programs\Python\Python311\lib\code.py", line 63, in runsource
    code = self.compile(source, filename, symbol)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\andre\AppData\Local\Programs\Python\Python311\lib\codeop.py", line 185, in __call__
    return _maybe_compile(self.compiler, source, filename, symbol)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\andre\AppData\Local\Programs\Python\Python311\lib\codeop.py", line 96, in _maybe_compile
    code2 = compiler(source + "\n\n", filename, symbol)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\andre\AppData\Local\Programs\Python\Python311\lib\codeop.py", line 150, in __call__
    codeob = compile(source, filename, symbol, self.flags, True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: Negative size passed to PyUnicode_New
History
Date User Action Args
2021-11-16 00:47:43arobergesetrecipients: + aroberge, lys.nikolaou, pablogsal
2021-11-16 00:47:43arobergesetmessageid: <1637023663.78.0.877430736208.issue45812@roundup.psfhosted.org>
2021-11-16 00:47:43arobergelinkissue45812 messages
2021-11-16 00:47:43arobergecreate