dropbox/pyston — pull request #132 by tjhance (2014-08-21 10:26:40+00:00)
Title: Future

(This depends on #130, which isn't in yet.)

- Added some syntax errors if you import `__future__` incorrectly. To do this, traverses the AST to look for `from __future__ import` statements. Collects a list of `__future__` flags enabled.
- Added the division future, and the ability to do truediv with ints and floats

To add truediv, I added a TrueDiv pseudo-AST-node and use that optype when generating the code. I guess it might make more sense to generate the AST using TrueDiv instead of Div (right now, I convert Div to TrueDiv at code generation time) but we don't have our own parser.

The `__future__` module has an old-style class, so to get the tests to pass, I added an `allow-warning` directive for test cases. (Right now pyston spits out a warning for old-style classes, since it treats them as new-style.)