Python 2.7 compatibility
This commit makes the Python code backwards compatible down to Python 2.7. Previously it would only run on Python 3.5 and up. Problems fixed included: - `time.perf_counter()` doesn't exist - all classes need to be new-style - `functools.lru_cache` doesn't exist - only the last argument to a function call can be `*`-expanded - the `nonlocal` keyword doesn't exist - metaclasses are used with a different syntax - `yield from` doesn't exist - `tempdir.TemporaryDirectory` doesn't exist - iterators need a `next()` method
Showing
- astnodes.py 2 additions, 3 deletionsastnodes.py
- backends/cbackend.py 2 additions, 3 deletionsbackends/cbackend.py
- backends/dot.py 1 addition, 1 deletionbackends/dot.py
- cpu/cpujit.py 36 additions, 24 deletionscpu/cpujit.py
- equationcollection/equationcollection.py 4 additions, 1 deletionequationcollection/equationcollection.py
- equationcollection/simplificationstrategy.py 5 additions, 6 deletionsequationcollection/simplificationstrategy.py
- field.py 1 addition, 1 deletionfield.py
- llvm/control_flow.py 1 addition, 1 deletionllvm/control_flow.py
- sympyextensions.py 2 additions, 2 deletionssympyextensions.py
Please register or sign in to comment