flynn.gg

Christopher Flynn

Data Scientist
Data Engineer
PhD Mathematician

Home
Projects
Open Source
Blog
Résumé

GitHub
LinkedIn

Blog


2018-10-19 Feed

Developing a package that is compatible with Python versions old and new is great at helping it become more widely used. However, making software work on both Python 2 and 3 generally implies a messier codebase, increasing development cost and maintenance. As the language improves, developers who choose to exploit new language features in their packages will typically need to drop support for old Python versions.

Python 2 has a little over a year before it reaches its end of life, meaning its core developers will no longer maintain it, and no new Python 2 minor or patch versions will be released. Despite this fact, Python 2 still dominates Python 3 when it comes to package installs. This is likely due to a combination of production legacy code still running on Python 2 and many operating systems still coming pre-installed with the old version.

With the end of the support timeline in sight, companies have begun migrating to Python 3. Instagram, Dropbox, and Facebook have all discussed their experience in making the switch, and have even seen performance benefits as a result.

The migration trend is manifested in the __all__ package download charts on pypistats.org. For the first time, Python 2 downloads have composed less than 60% of package downloads for 10 straight days and the trend continues downwards.

pypistats

Assuming this trend continues, we could see 2 and 3 reaching parity in about six more months.

Further reading

pypistats.org

migrations

Python Package Index

Back to the posts.