Skip to content

Commit 904c202

Browse files
committed
WIP
1 parent d0049a3 commit 904c202

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Lib/_pyrepl/console.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,14 @@ def __init__(
164164
self.barry_as_FLUFL = False
165165

166166
def check_barry_as_FLUFL(self, tree):
167+
if self.barry_as_FLUFL:
168+
return
167169
for node in ast.walk(tree):
168170
if isinstance(node, ast.ImportFrom) and node.module == "__future__":
169171
if any(alias.name == "barry_as_FLUFL" for alias in node.names):
170172
self.compile.compiler.flags |= getattr(__future__, "barry_as_FLUFL").compiler_flag
171173
self.barry_as_FLUFL = True
174+
break
172175

173176
def showsyntaxerror(self, filename=None, **kwargs):
174177
super().showsyntaxerror(filename=filename, **kwargs)
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
Fixed barry_as_FLUFL future flag does not work in new REPL. Patch by Jiahao
2-
Li
1+
Fix support for the ``barry_as_FLUFL`` future flag in the new REPL.

0 commit comments

Comments
 (0)