staffanm/ferenda — pull request #6 by staffanm (2014-05-04 10:54:38+00:00)
Title: Use the future module instead of six

Currently the codebase uses the six module to enable a single-source tree for both python2 and 3. This requires that the code uses six idioms and names (which are similar to what python3 uses, but not identical) A better way might be to use the future module, which -- in general -- allows for writing ideomatic python3 code, and having it magically work on python 2 as well.

However, the branch as it stands now adds quite a bit of boilerplate, and those parts of the code that are really concerned with types (eg ferenda/elements.py) seem to require various amount of fiddling to workaround the future.builtins.types.newstr (and friends) types that future provides for python 2. Furthermore, we are heavy users of one part of the stdlib that has been massively reorganized between 2 and 3 (urllib/urlparse), and future does not directly support this part of the stdlib.