py-backwards
py-backwards copied to clipboard
Python to python compiler that allows you to use Python 3.6 features in older versions.
This is a bit closer to how the actual 3.6 implementation works
python 3.5 and 3.6 have made asynchronous code much more straightforward to write, and while there were some changes in the execution model, much code can run with just desugaring,...
eg options to disable str -> unicode and '' -> u'' conversions.
Snippets like: ``` @snippet def import_rewrite(previous, current): if __import__('six').PY2: extend(current) else: extend(previous) ``` Are failing with: ```python In [47]: import_rewrite.get_body(previous=[], current=[]) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) in ()...
We should define sources encoding if target is 2.7, like: ``` # -*- coding: utf-8 -*- ```
Is it possible to use py-backwards from setup.py, so that we can write packages using the 3.6 syntax and 'automatically' compile the package for other Python versions when building the...
Could it be possible to install py-backwards as an import hook that automatically backwardsizes python files (with e.g. a special comment or file extension) on import? I know pytest does...
It would be nice to support automatic recompilation of changed files with watchman.