#23861: IPAddressField removal will break migrations and test suites
-----------------------------------------+------------------------
               Reporter:  spookylukey    |          Owner:  nobody
                   Type:  Bug            |         Status:  new
              Component:  Uncategorized  |        Version:  master
               Severity:  Normal         |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 Currently `IPAddressField` is set to be removed in Django 1.9.

 The problem is that all migrations that use `IPAddressField` will then
 break, and this means the entire stack of migrations will break (because
 they are all imported even when not executed, and the migration file
 references `django.db.models.IPAddressField` at import time). This also
 means that test suites will break, since migrations are run to set up the
 DB.

 To be clear, this will happen even if you have migrated away from
 `IPAddressField` - the old versions of the schema still reference
 `IPAddressField`, and your old migrations will therefore break everything
 (current migrations, test suite) until they are re-written.

 Re-writing old migrations is itself a nasty fix, and not something we want
 to encourage.

 This will be especially bad for 3rd party apps who can't just throw
 away/squash old migrations. It would be really nasty for users of those
 libraries if they had to squash all migrations in order to support Django
 1.9.

 So, I think we need a different strategy for deprecating fields. We need
 to keep a stub `IPAddressField` around - basically forever.

 Also, the deprecation warning for these old fields can make test suite
 output really noisy if you have warnings turned on (which can be a very
 good way to find code that needs fixing). Ideally we'd find some way of
 only outputting the warning when the field was *really* being used - not
 just instantiated due to an old migration being run.

--
Ticket URL: <https://code.djangoproject.com/ticket/23861>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/054.ac497f9fc95d50050d1611fd24c9da44%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to