My completely anecdotal view on the state of Python 3 in 2016. Based on my own recent experience, observations, and exchanges with other members of the Python community.
Disclaimer: Anyone who sent you here in order to argue against Python 3 or for Python 2 hasn’t read past the first paragraph. Take their claims with the necessary grain(s) of salt.
Looking at the PyPI download statistics1 of, the Python 3 situation seems gloomy:
(Downloads 2016-11-10 – 2016-12-11; compare to February 2016 when 2.6 was more popular than all 3.x together.)
And if my company is any indication, Python 2 applications are unlikely to be ported to Python 3. Why should they? Python 2 is officially supported until 2020. Who knows whether the app will exist in that form by then.
The number of these applications is huge. And this number won’t decline significantly in the foreseeable future. Nobody wants to touch their working systems2.
The Very Gradual Improvement
The vast majority of important libraries on PyPI are hybrid: they support both Python 2 and 3. It’s very rare that someone releases a Python 2-only library nowadays (I’m rather seeing occasionally the opposite and so does Microsoft).
New projects and applications are started frequently3 in Python 3. For example, Patreon moved from PHP to Python 3. Why not? Unless you intend to use PyPy (and some rare low-level unicode edge cases aside) it’s objectively the nicer language. How often are new projects started? In the days of micro services maybe more often than one’d think.
Given the state of the libraries, choosing between Python 2 and 3 is a matter of personal preference and company policy rather than technical reasons.
Especially community members that joined us later and don’t have such an ingrained antipathy to Python 3 find it natural to use Python 3. I’ve seen that both in the Twisted and the Pyramid communities. People have been trying to use Twisted on Python 3 long before it was really fit for it. Django – one of the main entry drugs to Python – by itself did a dent in Python 3 usage by using its syntax in their documentation.
Now remember what enormous growth the Python community had in the past months and years. At some point those people are going to be in charge while the old guard yells at clouds. This transition has already begun.
Most educators already teach Python 3 (notable troll aside):
@hynek more anecdote: kids in UK learn Python3 - it's the standard promoted by @Raspberry_Pi & soon #BBCMicroBit via @Micropython. #longterm— Nicholas Tollervey (@ntoll) February 17, 2016
@hynek I teach only Python 3 at @treehouse— ❤ (@kennethlove) February 17, 2016
If you wonder what people actually use, PyCharm tweeted their statistics:
#Python 3: 50%, 2: 65% (overlap), 3 outgrows 2 by 2017-12 (source: @PyCharm stats) contrary to @zedshaw claims in https://t.co/E470kVLq5x pic.twitter.com/CFvTddQnhZ— Andrey Vlasovskikh (@vlasovskikh) November 24, 2016
Statistics about IDE users are obviously biased towards new programmers but that’s exactly the point.
Interestingly, the various sub-communities are coping differently. For example the scientific community is way ahead of the average which in my humble opinion is caused by the huge influx of new users in recent years. IPython/Jupyter even intends to release a first major Python 3-only release (6.x) in 2017.
asyncio is another interesting topic. I was surprised how alive and well that little corner of the Python community is (albeit in mainly Russian speaking countries 🙂). Deservedly so I may add. So I’m not surprised that Python 3.4 was the first one with serious adoption.
If you look closely, there are also plenty big companies focused on Python 3 porting. Red Hat has ported their Python tools to Python 3. OpenStack is almost done. Facebook is very outspoken about Python 3, has a policy of starting new projects on Python 3, and runs Python 3 on every single server:
@IsraelFruchter @hynek @d0ugal @VictorStinner Python 3.5.2 is running on literally every server.— Łukasz Langa (@llanga) November 27, 2016
Did you know that Patreon runs on Python 3 and Flask?
What does all that mean?
It means we have to write hybrid libraries for PyPI for the foreseeable future4.
It means that the PyPI download statistics won’t look much better anytime soon due to sheer numbers of written Python 2-only code and Python 2.7 still growing.
But it also means that Python 3 is growing. A new generation of Python developers likes it and doesn’t understand why anyone would want to subclass
object in each class.
And finally it means that Python 3 is not the death of Python. But we’ll have to live with two Pythons for quite a while. If we manage to not kill each other over it, everyone’s gonna be fine.
We for one start all our new projects in Python 3.5 nowadays and don’t want to go back. So stop arguing about it and just join us. I think you’ll like it.
- Those numbers have to be taken with a grain of salt anyway. Mirrors, caching, system packages, et cetera skew them in unpredictable ways. Interestingly, I’ve been told that macOS wheels for NumPy are above 30% for Python 3. For scientific packages, this information is much more telling than sheer download numbers. ↩︎
- Even though porting to Python 3 with a good test suite is not a big deal. But few have good test suites and even fewer have incentives to invest any time into it. ↩︎
- Sorry, I can’t quantify this. It’s just the general sentiment that I hear around me. One of the biggest problems of this discussion is that it’s virtually impossible to quantify anything. ↩︎
- Although I’d like to invite you to join me dropping Python 2.6. ↩︎