Skip to content

Commit 400f5ed

Browse files
committed
More general adaptation of showsyntaxerror() to Python 3.13
Python 3.13's code.InteractiveInterpreter adds a new **kwargs argument to its showsyntaxerror() method. Currently, the only use of it is to send a named argument of name "source". Whilst the current adapation of repl.Interpreter is specific and should work in the short term, here is a more general solution.
1 parent 5b31cca commit 400f5ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bpython/repl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def runsource(
153153
return super().runsource(source, filename, symbol)
154154

155155
def showsyntaxerror(
156-
self, filename: Optional[str] = None, source: Optional[str] = None
156+
self, filename: Optional[str] = None, **kwargs
157157
) -> None:
158158
"""Override the regular handler, the code's copied and pasted from
159159
code.py, as per showtraceback, but with the syntaxerror callback called

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy