Over a million developers have joined DZone.

Download Stats By Python Version: PyMongo, Motor, Tornado

After PyCon last month, Python packaging saint Donald Stufft generously tweeted:

If you’re interested to see Py2 vs Py3 breakdowns for a Python package, let me know while I still have the data set loaded (~300GB DB).

He had the database loaded for his diverting article on a Year of PyPI Downloads, but I was curious about three packages I own or contribute to.


PyMongo

Here's PyMongo's downloads this year, by Python version:

PyMongo downloads

Python 2.7 dominates, and it is growing at the expense of 2.6. Python 2.4 is absent, and PyMongo downloads for Python 2.5 vanished last year, which validates our decision to drop Python 2.4 and 2.5 from the latest release, PyMongo 3.0.

Donald made a second chart isolating the Python 3 downloads:

PyMongo downloads for Python 3

As one expects, people who use Python 3 use the latest one, Python 3.4. When we released PyMongo 2.8.0 at the end of January, the download spike was entirely Python 3.4 users.

I expect Python 3.5 will soon dominate among Python 3 users, and Python 2.6 will continue to decline asymptotically, while the Python 2 versus 3 ratio overall will stay steady for a few more years.

Motor

Something is wrong with Donald's chart for Motor, but it suggests that Motor users are like PyMongo users: 10% run the latest Python 3, 50% run Python 2.7, and the others run a smattering of other Pythons. (Motor has never supported Python before 2.6.)

Motor downloads

In Donald's Python 3 chart, it seems only Python 3.4 is represented:

Motor downloads for Python 3

Tornado

Motor's potential user base includes all Tornado users, so I was curious about Tornado's overall distribution:

Tornado downloads

I have no explanation for the spike of Python 2.6 downloads last fall; Tornado's release schedule doesn't strongly correlate with it. Tornado's user base is distributed similarly to PyMongo's, though more inclined to stay on Python 2.6.

Again, Tornado's Python 3 users hold steady at ten percent, but they switched to Python 3.4 quickly after it was released.

Tornado downloads for Python 3

Conclusion

The takeaways are: Python 2.4 is dead, and 2.5 is effectively dead for PyMongo, Motor, and Tornado users. It's important to keep packages working in Python 2.6—mainly for enterprises with long-term support contracts for Linux versions that shipped with 2.6—but adding features or optimizations that only work in Python 2.7 is reasonable now.

It's critical we keep testing Python 3.5 alphas and betas as they come out, because the 10% of people who run Python 3 will migrate to 3.5 rapidly. Python 3.2 is nearly dead, and 3.3 will also vanish soon.

Topics:

Published at DZone with permission of A. Jesse Jiryu Davis, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}