Alex Gaynor avatar 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.

Comments (0)

Files changed (1)

pypy/interpreter/pycompiler.py

             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)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.