Author: Benjamin Peterson <[email protected]>
Branch:
Changeset: r45595:311ced346dbb
Date: 2011-07-14 08:51 -0500
http://bitbucket.org/pypy/pypy/changeset/311ced346dbb/
Log: technically we should always have mandatory __future__ flags
diff --git a/pypy/interpreter/pycompiler.py b/pypy/interpreter/pycompiler.py
--- a/pypy/interpreter/pycompiler.py
+++ b/pypy/interpreter/pycompiler.py
@@ -119,6 +119,7 @@
raise OperationError(self.space.w_TypeError, self.space.wrap(
"invalid node type"))
+ flags |= self.future_flags.mandatory_flags
fut = misc.parse_future(node, self.future_flags.compiler_features)
f_flags, f_lineno, f_col = fut
future_pos = f_lineno, f_col
@@ -137,6 +138,7 @@
return code
def compile_to_ast(self, source, filename, mode, flags):
+ flags |= self.future_flags.mandatory_flags
info = pyparse.CompileInfo(filename, mode, flags)
return self._compile_to_ast(source, info)
@@ -154,6 +156,7 @@
return mod
def compile(self, source, filename, mode, flags, hidden_applevel=False):
+ flags |= self.future_flags.mandatory_flags
info = pyparse.CompileInfo(filename, mode, flags,
hidden_applevel=hidden_applevel)
mod = self._compile_to_ast(source, info)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit