
Python 2.x vs. 3.x survey results - janzer
https://wiki.python.org/moin/2.x-vs-3.x-survey
======
jcater
I find these responses promising. I see some negativity here that after 5
years, over half of the devs are still on Python 2. But reading some of the
threads in the last few weeks, you would assume that fewer than 5% of all
people attempting Python 3 stuck with it. And this survey, if it is
representative of the community at large, obviously doesn't show that.

Sure, more people use Python 2 than 3, but is that really surprising with the
legacy code out there? The point is that Python 3 is _also_ being used quite a
bit.

~~~
shadowmint
Fewer than ~22% are sticking with python 3. Admittedly that's more than 5%,
but I'd hardly call it a blazing success story, when 60% of people have tried
it.

So, 22% of 60% of people all up are sticking with python 3. 13%. Woo...

~~~
the_mitsuhiko
Less than 4% of pypi download stats are Python 3, so i doubt the results of
this survey are representative.

~~~
janzer
I'm wondering where that number comes from? I've seen this stat a few times
recently but don't know where it came from.

Just doing a quick perusal of the top 5 projects listed at [http://pypi-
ranking.info/alltime](http://pypi-ranking.info/alltime)

1 (boto) does not support 3.x

3 (distribute, zc.buildout and pip) only distribute non-version dependent
files

leaving just 1 (lxml) with version dependent installers listed at all and it
is only for the windows installers.

Drilling down into lxml, roughly 95% of its downloads are the version agnostic
.tar.gz file. Also the version dependent installers do not include a 3.3
version but only 3.2 for python3. But even with only an installer for a old
version of python3 available it still is >8% of version dependent downloads.

~~~
shadowmint
I suppose it was derived somehow from
[https://pypi.python.org/pypi/pypstats](https://pypi.python.org/pypi/pypstats)

As a number of people have pointed out though, there's no new data since May
2013, no idea why ([https://bitbucket.org/pypa/pypi/issue/33/package-stats-no-
lo...](https://bitbucket.org/pypa/pypi/issue/33/package-stats-no-longer-
updated)), so the the '4%' number is probably out of date anyway.

------
berkut
What's also missing here is differentiating between "dependencies" as other
python libs or host apps with built-in python interpreters stuck to a
particular version.

For example, VFX studios are generally stuck on 2.6.4 as that's what Maya
2012, Nuke 7 and other commercial software is using.

Lots of VFX studios have hundreds of thousands of lines of Python code
integrating stuff across their pipeline. Until the host apps support Python 3
(some like Houdini support both 2/3 via different plugin proxies), it's a
Chicken and Egg situation, as VFX studios won't port their python code to 3
until they need to, and the commercial companies making the software above
aren't going to waste time adding Python 3 support until their customers ask
for it.

So I'm assuming 2.6/7 is going to be around for a while...

~~~
Keyframe
One solution would be to provide the two in parallel. But then again this area
is slowly moving. I just recently (early last year) wrote my last MEL code and
moved fully onto python.

~~~
berkut
Yeah, but that's quite likely (without some sort of façade layer) going to be
double the work adding new functionality, and it's definitely going to be
twice the testing of the entire Python functionality of the apps.

------
Stubb
Speaking from the perspective of someone who doesn't code in Python: I
recently considered doing so for a scientific computing task at work but
quickly ditched the notion. Python 3 seemed the recommended choice for a
green-field project, but good luck getting anywhere with it due to poor
library support. Want to access a MySQL database, generate 3-D graphics, or
use someone else's code? Good luck with that! Python 3 may have been released
five years ago, but uptake among developers appears negligible. So why not use
v2.7? Several features in v3 looked appealing, and documentation makes it
clear that v3 is the future. So I decided not to invest in a language that
can't make up it's mind and stuck with R.

~~~
pyre
> So I decided not to invest in a language that can't make up it's mind

It's a bit unfair to try to group the actions of vast swaths of people under
the same banner, and penalize them for not acting in concert.

Why isn't the entire Python community using 100% Python3 right now? Because
they are a disparate group of people with differing motivations and goals.
It's only been in the last year that some major projects have started to
support Python3 (e.g. Django). Not everyone has the luxury of spending all
their time porting over existing code-bases to Python3 the moment that it's
possible.

~~~
Finster
When choosing a language, the community is (almost) everything. If the
community is divided and unwilling to support v3, that is more than enough
reason to "penalize" them and not use the language.

------
bru
I'm surprised, if not saddened, by the low popularity of `3to2`: less than 2%
of the people surveyed have used it, even though it is a convenient way to
have your code in python 3 when stuck with libraries that use python 2.

edit: direct link to the pdf:
[https://wiki.python.org/moin/2.x-vs-3.x-survey?action=Attach...](https://wiki.python.org/moin/2.x-vs-3.x-survey?action=AttachFile&do=get&target=2013-2014+Python+2.x-3.x+survey.pdf)

~~~
wbond
I would presume most people who are writing 3.x code have written 2.x code
before, or don't care about 2.x. I personally have gotten used to the syntax
that works in both, and tend to write my code in the most compatible manner
possible.

~~~
bru
That's something for which I should strive. I've never written "polyglot"
scripts longer than 1 file with 100 lines. Writing compatible syntax is
feasible without too much hassle, but most problems I encountered were when I
wanted to use a library whose API evolved between 2 and 3...

Do you have experience with the `six` library[0]? I've read a few times about
it recently and it seems a convenient way to write portable code. I still wait
for an opportunity to use it!

0: [http://pythonhosted.org/six/](http://pythonhosted.org/six/)

~~~
pyre
You can see _some_ usage here[1]. Mostly just using it to check for string
types, but it's the only usage example that I could pull off the top of my
head.

[1] [https://github.com/twilio/flask-
restful/blob/master/flask_re...](https://github.com/twilio/flask-
restful/blob/master/flask_restful/reqparse.py)

------
belluchan
Biggest dependency still keeping me back is Twisted, progress:
[http://twistedmatrix.com/trac/wiki/Plan/Python3](http://twistedmatrix.com/trac/wiki/Plan/Python3)

It's either that or writing some blocking code or something. No thanks.

~~~
nilsbunger
Would you consider Tornado? It's compatible with 3.x and even uses the new
asyncio stuff.

~~~
falcolas
I moved away from Tornado recently; I was quickly getting lost in callback
hell. This was at least partially due to using libraries which did not support
Tornado's method of async io natively, and a lot more fear that even putting
these outputs in threads would still cause delays we could not afford.

I moved this project to Go, though I've quickly run into quirks there as well.

------
waleedka
I was pleasantly surprised by these results. Language adaption is not linear,
it follows an S curve. So while 22% are on Python 3 after 5 years, we can
expect to reach 80% much faster.

------
ognyankulev
So the bigger half of developers stick to Python 2 and the smaller other half
actually tried migration to Python 3. After 5 years of promoting Python 3 as
the future.

~~~
viraptor
From this short survey we can't really know if it's "developers stick to
Python 2", or "have tried Python 3, but migrated because of X", or "haven't
tried Python 3 yet", or "work daily on a project that will not be ported to
Python 3 as long as possible".

I would expect that the last group is really big - imagine a company with a
huge python 2 codebase. You're not going to just say "let's port everything"
without a good reason for it. Even after you do, you have to port and prove
all your dependencies are working correctly, only then going for the big
projects. So while most people will still describe themselves as people
working primarily with python 2, there may be a person or two in their teams,
who already work on porting...

------
janzer
These are the results from the survey that was on HN a few days ago.

[https://news.ycombinator.com/item?id=6990481](https://news.ycombinator.com/item?id=6990481)

------
cvburgess
The only thing really "keeping" me on Python 2.x is how easy it is to host it.
Although Flask/Django/Bottle all support Python 3, most (if not all) PaaS
providers I have used only support Python 2.7.

~~~
toyg
Heroku supports 3.x fine, IIRC.

~~~
cvburgess
Looks like you are correct [1] - this was not the case last time I checked.
Thanks!

Any others?

[1] [https://devcenter.heroku.com/articles/python-
runtimes](https://devcenter.heroku.com/articles/python-runtimes)

------
jpmc
A different view of the data.

[https://docs.google.com/spreadsheet/pub?key=0Aj15Prf9CEepdGx...](https://docs.google.com/spreadsheet/pub?key=0Aj15Prf9CEepdGxfeExINHZYbUNXWUFDTkhobWd2a3c&output=html)

------
robomartin
Python 3.x has to be the future, there are lots of really well articulated
reasons for that. The problem here is that the transition was not, in my
opinion, handled intelligently.

What I mean by this is that in five years there are a number of things that
could have been introduced incrementally and with minor impact to existing
libraries. For example, making range() behave like xrange() seems trivial from
a user's point of view. The same with print vs. print().

Yes, some of the other important differences would require breaking code in
more serious ways. This, too, over five years, could have been introduced with
incremental transition tools that would make the upgrading of existing
libraries as automatic as possible.

If a language doesn't have massive and useful libraries you can play with it
and break it. Nobody will care and adoption will be swift. That's not the case
with Python. Aside from language benefits I'd say the main differentiating
reason for which Python is really valuable is that there are libraries out
there to do just about anything you want. Breaking (or un-breaking, depending
on your perspective) the language breaks the libraries, therefore, no matter
how wonderful the language might be it is a non-starter.

The transition from one version to the next has to be automatic. Nobody has
the clock cycles to engage in months' long research projects to comb through
code and fix things. No, tools like 2to3 are not what I am talking about.

One non-coding example I can offer is what happens when you open an old
Solidworks file with a newer version of Solidworks. The program immediately
fires-up a format converter and tells you it is converting to the new file
format. Once done, you save and you are done. All you have to do is open the
file and re-save it. That's how it should be. Surely in this day and age
there's enough CS intelligence out there to make a fully automatic version-to-
version converter. Now that would be something. It would certainly bring the
Python community forward in unimaginable ways.

I'll go further and suggest that this could actually be an idea that could set
Python apart: No new version is released without a matching fully-automatic
old-to-new converter.

Hey, ideas are easy.

------
e12e
For those interested in python 2/3 that haven't (recently) read the
(unofficial) faq, I highly recommend taking a look:

[http://python-
notes.curiousefficiency.org/en/latest/python3/...](http://python-
notes.curiousefficiency.org/en/latest/python3/questions_and_answers.html)

------
Siecje
One thing I don't understand is if there are third party libraries holding
people back then why isn't there something in the python 3 standard library
that you can substitute?

------
stefanu
I would love to move to Python 3 as I have no technical dependencies. The only
reason I'm still writing my code and open-source library in Python 2 is the
ecosystem of my clients. Even if that was technically possible to migrate to
Python 3, it might not viable business-wise. It would be considered as
unnecessary expense for something that "just works".

I guess we just need to reach some adoption tipping point or end of support of
Python 2. Whichever comes first.

~~~
maxerickson
I kind of get the sense that a lot of the recent belly aching is because
people can smell the adoption tipping point coming.

~~~
dded
I thought about this, as someone with reasons to prefer Python2. But then I
quit worrying. Python2 isn't going anywhere, for starters. But more to the
point, if lots of people move to Python3, some of them will share my issues.
They'll make noise, push for resolution, offer solutions, etc. Widespread
adoption makes it _more_ likely that my concerns will be addressed.

------
thinxer
Nowadays most libraries have python 3 versions, but not every machine has
python 3 (or even 2.7) installed. Most of times it is very difficult to
install softwares on those machines. The availability of python 3 is my major
concern.

------
hit8run
What are the conclusions from this survey?

------
nilved
A PDF? What is this?

~~~
leephillips
PDF stands for "Portable Document Format". It was invented by Adobe; you can
find more information about it at
[http://www.adobe.com/products/acrobat/adobepdf.html](http://www.adobe.com/products/acrobat/adobepdf.html)
.

It's an excellent format for sharing documents, because, unlike, for example,
HTML, it preserves formatting exactly and it can be self contained: you can
embed all the fonts for a document within the PDF. It has some disadvantages
compared with HTML: it doesn't reflow and is slower to search through, for
example. But when you need or want a document's formatting to be preserved in
detail, PDF and Postscript are the only open specifications you can turn to,
aside from just using images.

~~~
nilved
I meant it in the "What is this shit?" or "What is this, 2004?" sense. There's
no reason to use PDFs, especially when we're talking about developers and
development. I'm not going to install a program just to view your document.

~~~
claystu
What are you running that can't view a pdf?

~~~
nilved
It's not as much "can't view a pdf" as it is "not willing to pull in 20
packages and dependencies to view a pdf." You might as well send it around as
a spreadsheet: who doesn't have Excel installed???

I appreciate the text-based version that was posted in this thread, thank you!

~~~
twright0
If you're working solely in an environment so minimal and obscure that it
can't view a PDF, I think you've lost the right to be catered to (and
complain) when it comes to document format decisions.

The comparison to Excel is absurd; PDF is an open format and has been for more
than five years.

