[Python-Dev] Python 2.x and 3.x use survey, 2014 edition

Barry Warsaw barry at python.org
Fri Dec 12 20:58:03 CET 2014


On Dec 12, 2014, at 08:07 PM, Petr Viktorin wrote:

>If anyone is wondering why their favorite Linux distribution is stuck with
>Python 2 – well, I can only speak for Fedora, but nowadays most of what's
>left are CPython bindings.  No pylint --py3k or 2to3 will help there...

It's true that some of these are tough.  I tried and failed a few times to
port Xapian to Python 3.  The issue was opened upstream 6 years ago and it's
still unresolved: http://trac.xapian.org/ticket/346

OTOH, I ported dbus-python to Python 3 and that worked out much better; we've
had solid Python 3 bindings for several years now, which allowed us to port
many important Debian/Ubuntu tools to Python 3 and more importantly, do all
our new work in Python 3.  With other big toolkits like GObject introspection
working on Python 3, there's a lot you can do.

IME, if the underlying model is string/bytes clean, then the C extension port
can sometimes be easier than pure-Python, thanks to cpp games.  D-Bus's model
is pretty clean, Xapian I found to be not so much (it doesn't help that Xapian
is C++ ;).

We're actually not terribly far from switching Debian and Ubuntu's default
to Python 3.  On Debian, the big blocker is the BTS code (which uses SOAP) and
on Ubuntu it's the launchpadlib stack.  I hope to find time after Jessie to
work on the former, and before 16.04 LTS to work on the latter.

Not that I disagree that there's a long tail of code that would still benefit
a significant population if it got ported to Python 3.  By far Python 3 is a
better language, with a better stdlib, so the work is worth it.

Cheers,
-Barry


More information about the Python-Dev mailing list