mirror of
https://github.com/python/cpython.git
synced 2025-09-01 14:38:00 +00:00
gh-119443: Turn off from __future__ import annotations in REPL (#119493)
This commit is contained in:
parent
548a11d5cf
commit
a8e35e8eba
3 changed files with 12 additions and 1 deletions
|
@ -100,7 +100,7 @@ class InteractiveColoredConsole(code.InteractiveConsole):
|
|||
the_symbol = symbol if stmt is last_stmt else "exec"
|
||||
item = wrapper([stmt])
|
||||
try:
|
||||
code = compile(item, filename, the_symbol)
|
||||
code = compile(item, filename, the_symbol, dont_inherit=True)
|
||||
except (OverflowError, ValueError):
|
||||
self.showsyntaxerror(filename)
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue