[Python-Dev] (Looking for) A Retrospective on the Move to Python 3

Eric Fahlgren ericfahlgren at gmail.com
Sat May 12 13:13:24 EDT 2018


[esr]
> All this code runs under either 2 nor 3 without requiring six or any other
> shim library.

We've got an application that's about 500k loc, runs under both 2 and 3.
It has only one shim, a 'metaclass' decorator similar to what six provides,
other than that it's all quite clean 2- and 3-wise.

We long ago adopted "from __future__" as a standard part of every source
file, so we have internalized the Py3 print, division and import behaviors
as the norm.  An occasion scan with 2to3 kept us honest about
list-producing vs iterator-producing functions, and renamings and such.

Our major pain point was getting extension libraries that worked with 3,
notably VTK and wxPython, which weren't ported completely until last year.
We had been ready to switch over completely to Py3 almost four years ago,
but those major pieces were missing.  We have a production ready version
running under 3.6, but are going to wait for the 3.7 release before cutting
off support for Python 2 altogether.

Of note, we did not have any Unicode issues, as we adopted wxPython's
Unicode version as soon as it was available (6-7 years ago?), and had
virtually no issues then or since.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20180512/369b91e9/attachment.html>


More information about the Python-Dev mailing list