From 4b36e179ecadca755c3444b5bc5e3f95a47b0d64 Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Sat, 12 Oct 2024 15:36:06 -0400 Subject: [PATCH] Fix Pythonwin displaying syntax errors in Python 3.13 (#2393) --- CHANGES.txt | 1 + Pythonwin/pywin/framework/interact.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 7f46e93c9..12f9b28f1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,7 @@ https://mhammond.github.io/pywin32_installers.html. Coming in build 308, as yet unreleased -------------------------------------- +* Fix Pythonwin displaying syntax errors in Python 3.13 (#2393) * Allowed installs from source w/o having pywin32 pre-installed (for instance, from GitHub) (#2349, @Avasam) * Restored version stamping of installed DLLs (#2349, @Avasam) * Fixed a circular import between `win32comext.axscript.client.framework` and `win32comext.axscript.client.error` (#2381, @Avasam) diff --git a/Pythonwin/pywin/framework/interact.py b/Pythonwin/pywin/framework/interact.py index d93934e0e..1d940c3ca 100644 --- a/Pythonwin/pywin/framework/interact.py +++ b/Pythonwin/pywin/framework/interact.py @@ -300,7 +300,7 @@ def __init__(self, locals=None, globals=None): self.globals = globals code.InteractiveInterpreter.__init__(self, locals) - def showsyntaxerror(self, filename=None): + def showsyntaxerror(self, filename=None, **kwargs): sys.stderr.write( tracebackHeader.decode("ascii") ) # So the color syntaxer recognises it.