[Zope-dev] Use of python3 compatibility packages six vs. futurize
Hanno Schlichting
hanno at hannosch.eu
Tue Oct 4 13:49:33 CEST 2016
Hi.
I think it is preferable if we stick to a single project, which gets
used as a runtime dependency, and since six is already used in many
projects, I'd continue to use it everywhere.
The 2to3 script or versions thereof shouldn't introduce a new runtime
dependency, as you only need to check in the code produced by these
scripts, so you can use those just fine. I've also used the zope.fixers
project, which extends 2to3 to apply some zope.interface specific
conversions.
I did run 2to3 on the Zope2 project and the result wasn't all too
helpful. There were many instances were the conversion produced invalid
results or changed behavior in undesirable ways, so I ended up manually
fixing and looking at each change anyways.
One thing I do find helpful is running a Python 3 pep8/flake8 over the
codebase, as it points out most of the places where you have invalid
Python 3 syntax.
Just my 2 cents,
Hanno
On Tue, Oct 4, 2016, at 11:29, Martin Häcker wrote:
> Hi python3-porters,
>
> At the Ressurection-Sprint in Halle, I learned that most of python 3
> porting in zope is done using six <http://pythonhosted.org/six/>.
>
> I've stuck to it during the work there, as it seemed to be the standard
> that other zope packages have adopted.
>
> But since futurize <http://python-future.org> offers a much more
> comprehensible implementation of the 2to3 Script and seems to be better
> maintained - I'd like to use it instead. Especially because it promises
> to make porting to py3 while maintaining py2 compatibility easier and
> faster. Any good reasons (besides consistency) not to use it? Is there
> some sort of consensus on this topic that has been reached before?
>
> Best Regards,
> Martin Häcker
More information about the Zope-Dev
mailing list