[Fixed]-Is there a definitive guide for upgrading both Django and Python versions at the same time?



Iโ€™m having an extremely tough time out there in trying to upgrade a Python 2.7/ Django 1.6.5 application to a Python3.x/Django 1.8.x web application.

I also have a big django-cms dependency, which is required to upgrade from 3.0.2 to 3.1.3

I would suggest going from "easiest" to "hardest". A migration from Django 1.6 to 1.8 will be expontentially easier than upgrading from Python 2.x to 3.x, simply because Python 2 and Python 3 are wildly different in some parts.

So with that in mind:

  1. Upgrade django from 1.6.5 to 1.6.11 โ€“ this should be a trivial step, but is required because django-cms v3.1.x requires django>=1.6.9
  2. Check everything works
  3. Upgrade django-cms from 3.0.2 to 3.1.3 โ€“ this should be a straight forward pip upgrade
  4. Double check everything works
  5. Upgrade django from 1.6.11 to 1.8 โ€“ this will be hard, and some things in django 1.6 might not be there any more. Just pip upgrade and hammer down bugs as you find them.
  6. Triple check everything works
  7. Upgrade python from 2.7 to 3.x โ€“ this will be nightmarish, 2to3 and six might help with this, but not much. Pray.
  8. Quadruple check everything works

That last step will undoubtedly be the hardest and have the most potential to break things. The earlier ones are more straight forward upgrades. But do not progress until you are certain your code works at every step of the way.


Leave a comment