DEV Community

Cover image for Migrating to Python 3.7 and Django 3.2
Athento
Athento

Posted on

Migrating to Python 3.7 and Django 3.2

Last year we migrated our product to Python 3.7 and Django 3.2. from Django 1.11 and Python 2.7. It was a hard road, but it made us grow professionally and gave us deep knowledge of these technologies that we would like to share with you.

Purpose and starting point
Athento is a complex product that has been under development and evolution for several years. Until now, Athento’s technology stack was based on Django 1.11 and Python 2.7, versions of these technologies that we needed to renew. In addition to the support issues we faced when using technologies that were already a few years old, we had limitations in terms of the functionality we could offer to our customers: many of the packages and libraries we wanted to use to implement cool features required newer versions of these technologies. Although we often managed to find a workaround, the time had come: we had to upgrade.

Our starting point was a product in these technologies, with a hundred installations. We had to upgrade the technological stack with the least impact on the more than 10K users who work with Athento daily. More than 230,000 lines of code to migrate, 80+ Django apps, and an additional challenge: to continue providing support to our customers, applying fixes, and implementing some new features in the old version of the product.

Analysis and start
Our first steps were to evaluate the strategy to follow and the upgrades we were going to apply, and in what order. None of us had done an upgrade of this caliber before. It was clear to us that any plan we might devise at this point was going to be subject to change and that we needed to be flexible and patient in trying new ideas. Our first question was: Python first or Django? or both at the same time?

We solved this question by studying compatibilities. We found that Django 1.11 supported Python versions up to 3.7. Having Python 3.7 allowed us to increase our Django version up to 3.2. While not the most modern versions of these technologies, they were a vast improvement to the versions we had with probably less effort than it would take to migrate to more modern versions. In addition, the candidate versions of Python and Django already had enough experience and background to give us peace of mind. So we decided to migrate the entire project to Python 3.7 with Django 1.11 and, in a second step, to migrate from Django 1.11 to Django 3.2.

Access the rest of this article from our website athento.com

Top comments (0)