1. Pypy
  2. Untitled project
  3. pypy

Commits

Alex Gaynor  committed 80dc370

Backout the change to use mandatory flags everywhere, this breaks relative imports, as absolute import is marked as mandator in 2.7, but it obviously isn't. Further, CPython doesn't seem to do it, and I can't find any actual advantage to it.

  • Participants
  • Parent commits e62883b
  • Branches default

Comments (0)

Files changed (1)

File pypy/interpreter/pycompiler.py

View file
             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
         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)
 
         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)