Skip to content

Excessive exception traces with Pythonwin.exe v307 #2393

@SukramLeinad

Description

@SukramLeinad

Steps to reproduce the problem

Open the Pythonwin.exe and type

c := 3

Expected behavior (as per python.exe)

File "", line 1
c := 3
^^
SyntaxError: invalid syntax

Actual behavior

Firing event 'ProcessEnter' failed.
Traceback (most recent call last):
File "C:\Program Files\Python313\Lib\code.py", line 65, in runsource
code = self.compile(source, filename, symbol)
File "C:\Program Files\Python313\Lib\codeop.py", line 152, in call
return _maybe_compile(self.compiler, source, filename, symbol)
File "C:\Program Files\Python313\Lib\codeop.py", line 74, in _maybe_compile
return compiler(source, filename, symbol, incomplete_input=False)
File "C:\Program Files\Python313\Lib\codeop.py", line 117, in call
codeob = compile(source, filename, symbol, flags, True)
File "", line 1
c := 3
^^
SyntaxError: invalid syntax

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files\Python313\Lib\site-packages\pythonwin\pywin\scintilla\bindings.py", line 148, in fire
rc = binding.handler(*args)
File "C:\Program Files\Python313\Lib\site-packages\pythonwin\pywin\framework\interact.py", line 565, in ProcessEnterEvent
if self.interp.runsource(
~~~~~~~~~~~~~~~~~~~~~^
source, ""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
): # Need more input!
^
File "C:\Program Files\Python313\Lib\code.py", line 68, in runsource
self.showsyntaxerror(filename, source=source)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: PythonwinInteractiveInterpreter.showsyntaxerror() got an unexpected keyword argument 'source'

System information

Python version and distribution:
PythonWin 3.13.0 (tags/v3.13.0:60403a5, Oct 7 2024, 09:38:07) [MSC v.1941 64 bit (AMD64)] on win32.

pywin32 version:
307, installed with pip

Windows Version:
Win 10 with local admin account

DLL locations:
C:\Program Files\Python313\Lib\site-packages\pywin32_system32\pywintypes313.dll
C:\Program Files\Python313\Lib\site-packages\pywin32_system32\pythoncom313.dll

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions