Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which order i should follow to upgrade in Python, DJango and DJango-cms?

I have to upgrade my python project, Which currently running on Python 2.7/Django 1.10.8 and Django-cms 3.4.5.

To version, Python 3.7 Django 2.2 Django-cms 3.6

May I know, From where I should start and is there any upgrade tools like Pylint to do this?

like image 722
Shankar Thiyagaraajan Avatar asked Jan 01 '23 15:01

Shankar Thiyagaraajan


1 Answers

This is the safest upgrade route as it keeps you in support windows at each step.

  • First, do the jump from python2.7 to python3.5 (at first you are only going to be able to get to version python 3.5 because of version support). This is also most likely to be the hardest step because a number of other packages and dependencies will need to be updated from python2.7->3.
    • When I have tackled this in the past I have used python-modernize to help accomplish the code migration. But, going through the packages is going to be a slow process (make sure you have some form of testing in place).
  • Next upgrade django to 1.11.
  • Then upgrade django-cms to 3.6 (latest version)
  • Now upgrade django to version 2.2 (latest version, LTS)
  • Now upgrade python to 3.7 (latest version)

Doing it in this order will keep you in support windows throughout the upgrade process.

An alternative option as a result of conversations in the comments is to do: Courtesy of @dirkgroten and @alasdair. This has the added advantage of skipping the python3.5 upgrade.

  • Upgrade django to the latest 1.11.X (currently 1.11.22). You should always use the latest minor Django version so that you are not missing out on security fixes, and Python 3.7 support wasn't added until 1.11.17.
  • Upgrade django-cms to 3.6 (latest version)
  • Upgrade Python to 3.7 (latest version)
  • Upgrade django to latest 2.2.X (LTS)
like image 72
Matt Seymour Avatar answered Jan 27 '23 03:01

Matt Seymour