Opened 5 years ago

Closed 5 years ago

#28182 closed Uncategorized (wontfix)

Introduce django code migrations

Reported by: Artur Barseghyan Owned by: nobody
Component: Uncategorized Version: dev
Severity: Normal Keywords: code migration proposal
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Python has awesome introspection. lib2to3 exists for a very long time. Third party libraries like python-modernize seem to work fine.

Within past 6 months I have migrated 3 sites from Django 1.6 to Django 1.8. Next year, likely, all of them are supposed to be migrated further.

Code migration costs a lot of time/funds/effort. Small companies can't always afford it (regularly). Even big companies (like Instagram) postpone code upgrades for a long time, due to (pick one) lack of human resources/funds, complexity, the hassle.

I wonder, why would established frameworks like Django, not be willing to simplify code migration process (between versions) by providing code migration steps.

Django could have a sub-module codemigraiton with sub-sub modules for each version update.

For instance, Django 2.0 could contain migrations steps from 1.8 to 2.0


Steps would be dependant.

There could be a command which would take care of the code migrations. It could accept a number of arguments, such as currentversion, sourcepath, etc.

The whole upgrade process could look as follows:

  • Developers install the desired/target version of Django
  • Run the commandto have their current code base upgraded.
  • Do the finishing touches by hand.

Most of the work could have been automated, so that developers spend their creativity in a better way.

I'm quite sure, this feature, it taken seriously, can bring Django to a new quality level and (why not?) raise more funds from companies interested in the future development of Django.

Change History (1)

comment:1 Changed 5 years ago by Tim Graham

Resolution: wontfix
Status: newclosed

The place to propose a big idea like this is the DevelopersMailingList. I think you would need to provide a proof of concept to show that it's feasible. Personally, I don't think automated code changes could be done very effectively. Also, this idea could likely be done as a third-party app rather than in Django itself.

Note: See TracTickets for help on using tickets.
Back to Top