futurizeandpasteurizescripts based on2to3and parts of3to2andpython-modernize, for automatic conversion from either Py2 or Py3 to a clean single-source codebase compatible with Python 2.6+ and Python 3.3+. a curated set of utility functions and decorators infuture.utilsandpast.utilsselected from ...
If you’re curious, you could then try to convert this code that you just brought to Python 3 back to Python 2. Using3to2you’d obtain this:https://gist.github.com/berdario/cbccaf7f36d61840e0ed. In which the only change that had to be applied manually is.encode('utf-8')at line...
futurizeandpasteurizescripts based on2to3and parts of3to2andpython-modernize, for automatic conversion from either Py2 or Py3 to a clean single-source codebase compatible with Python 2.6+ and Python 3.3+. a curated set of utility functions and decorators infuture.utilsandpast.utilsselected from ...
there's also the3to2tool, which aims to convert 3.x code back to 2.x code. In theory, this should work even better than going the other direction, since 3.x doesn't have as many nasty corner cases for the converter to handle (getting rid of as many of those as possible ...
- bpo-18473: Fixed 2to3 and 3to2 compatible pickle mappings. Fixed ambigious reverse mappings. Added many new mappings. Import mapping is no longer applied to modules already mapped with full name mapping. - bpo-23485: select.select() is now retried automatically with the recomputed timeout ...
Automatic conversion to Py2/3-compatible codepython-future comes with two scripts called futurize and pasteurize to aid in making Python 2 code or Python 3 code compatible with both platforms (Py2/3). It is based on 2to3 and uses fixers from lib2to3, lib3to2, and python-modernize, as...
futurize and pasteurize scripts based on 2to3 and parts of 3to2 and python-modernize, for automatic conversion from either Py2 or Py3 to a clean single-source codebase compatible with Python 2.6+ and Python 3.3+. a curated set of utility functions and decorators in future.utils and past.ut...