Opened 8 years ago

Closed 8 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

Description

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

/django/codemigration/django_2_0/
/django/codemigration/django_1_11/
/django/codemigration/django_1_10/
/django/codemigration/django_1_9/

Steps would be dependant.

There could be a django-migrate.py 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 django-migrate.py 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 by Tim Graham, 8 years ago

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