As far as I know, IPAddressField has no current features that are not also
available in a GenericIPAddressField. Therefore, I suggest that we, some
time from now, deprecate IPAddressField, in favour of
GenericIPAddressField.
For users, it is database-dependent whether IPAddressFields can just be
replaced with GenericIPAddressFields: on PostgreSQL and SQLite, no changes
are needed; schema changes are needed on MySQL and Oracle. Examples are
listed in the 1.6 release notes
[https://docs.djangoproject.com/en/dev/releases/1.6/#storage-of-ip-
addresses-in-the-comments-app], as we just made the same change for
comments.
--
Ticket URL: <https://code.djangoproject.com/ticket/20439>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: eromijn@… (added)
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/20439#comment:1>
Comment (by erikr):
Discussion started on django-developers:
https://groups.google.com/forum/#!topic/django-developers/Ji_j2RmJ17w
--
Ticket URL: <https://code.djangoproject.com/ticket/20439#comment:2>
* stage: Unreviewed => Someday/Maybe
Comment:
I'm almost sure we'll do this at some point. The ticket can be moved to
Accepted if the discussion concludes that we should do it now.
--
Ticket URL: <https://code.djangoproject.com/ticket/20439#comment:3>
Comment (by joejasinski):
Hey all, would it be possible to simply keep the old IPAddressField around
as a proxy to GenericIPAddressField? I know it adds a bit of redundancy
to the code, but would be one fewer backward-incompatible change to manage
during upgrades. Additionally, people could continue to use the more
concisely named IPAddressField. Just my thoughts...
--
Ticket URL: <https://code.djangoproject.com/ticket/20439#comment:4>
Comment (by erikr):
I don't think so - they use different database column types on MySQL and
Oracle. Worse, taking an IPAddressField column and using it to store
GenericIPAddressField data may result in silent truncation.
--
Ticket URL: <https://code.djangoproject.com/ticket/20439#comment:5>
* cc: mike@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/20439#comment:6>
* component: Forms => Database layer (models, ORM)
* stage: Someday/Maybe => Accepted
Comment:
The mailing list thread has several +1's and no objections from core devs.
--
Ticket URL: <https://code.djangoproject.com/ticket/20439#comment:7>
* status: new => assigned
* owner: nobody => erikr
--
Ticket URL: <https://code.djangoproject.com/ticket/20439#comment:8>
* owner: erikr =>
* status: assigned => new
* has_patch: 0 => 1
Comment:
PR: https://github.com/django/django/pull/1688
I have added the deprecation to the release notes, the documentation of
both IPAddressFields, and in the deprecation timeline. Warnings have been
silenced in all relevant tests.
--
Ticket URL: <https://code.djangoproject.com/ticket/20439#comment:9>
* stage: Accepted => Ready for checkin
Comment:
The PR looks good. I only have trivial comments. I'll merge it.
--
Ticket URL: <https://code.djangoproject.com/ticket/20439#comment:10>
* status: new => closed
* owner: => Aymeric Augustin <aymeric.augustin@…>
* resolution: => fixed
Comment:
In [changeset:"1a63092981c685214ea189a14007da7bcc823c17"]:
{{{
#!CommitTicketReference repository=""
revision="1a63092981c685214ea189a14007da7bcc823c17"
Fixed #20439 -- Started deprecation of IPAddressField
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20439#comment:11>
Comment (by Tim Graham <timograham@…>):
In [changeset:"33457cd3b0da69320d3f66bb6d5a673950c5032f"]:
{{{
#!CommitTicketReference repository=""
revision="33457cd3b0da69320d3f66bb6d5a673950c5032f"
Removed IPAddressField per deprecation timeline; refs #20439.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20439#comment:12>