[Django] #20439: Deprecate IPAddressField in favour of GenericIPAddressField

25 views
Skip to first unread message

Django

unread,
May 18, 2013, 8:01:30 AM5/18/13
to django-...@googlegroups.com
#20439: Deprecate IPAddressField in favour of GenericIPAddressField
--------------------------------------+--------------------
Reporter: erikr | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Forms | Version: master
Severity: Normal | Keywords: dceu13
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
Since Django 1.4, we've added `GenericIPAddressField`, next to
`IPAddressField`. The new GenericIPAddressField supports IPv4 as well as
IPv6 addresses, and does normalisation of IPv6 addresses. It can also be
configured to only accept IPv4 or IPv6 addresses.

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.

Django

unread,
May 18, 2013, 8:01:55 AM5/18/13
to django-...@googlegroups.com
#20439: Deprecate IPAddressField in favour of GenericIPAddressField
-------------------------------------+-------------------------------------
Reporter: erikr | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: master
Component: Forms | Resolution:
Severity: Normal | Triage Stage:
Keywords: dceu13 | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by erikr):

* cc: eromijn@… (added)
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/20439#comment:1>

Django

unread,
May 18, 2013, 8:08:31 AM5/18/13
to django-...@googlegroups.com
#20439: Deprecate IPAddressField in favour of GenericIPAddressField
-------------------------------------+-------------------------------------
Reporter: erikr | Owner: nobody

Type: | Status: new
Cleanup/optimization | Version: master
Component: Forms | Resolution:
Severity: Normal | Triage Stage:
Keywords: dceu13 | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

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>

Django

unread,
May 18, 2013, 8:12:10 AM5/18/13
to django-...@googlegroups.com
#20439: Deprecate IPAddressField in favour of GenericIPAddressField
-------------------------------------+-------------------------------------
Reporter: erikr | Owner: nobody

Type: | Status: new
Cleanup/optimization | Version: master
Component: Forms | Resolution:
Severity: Normal | Triage Stage:
Keywords: dceu13 | Someday/Maybe

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* 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>

Django

unread,
May 21, 2013, 6:00:24 PM5/21/13
to django-...@googlegroups.com
#20439: Deprecate IPAddressField in favour of GenericIPAddressField
-------------------------------------+-------------------------------------
Reporter: erikr | Owner: nobody

Type: | Status: new
Cleanup/optimization | Version: master
Component: Forms | Resolution:
Severity: Normal | Triage Stage:
Keywords: dceu13 | Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

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>

Django

unread,
May 23, 2013, 6:08:11 AM5/23/13
to django-...@googlegroups.com
#20439: Deprecate IPAddressField in favour of GenericIPAddressField
-------------------------------------+-------------------------------------
Reporter: erikr | Owner: nobody

Type: | Status: new
Cleanup/optimization | Version: master
Component: Forms | Resolution:
Severity: Normal | Triage Stage:
Keywords: dceu13 | Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

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>

Django

unread,
May 27, 2013, 8:12:52 PM5/27/13
to django-...@googlegroups.com
#20439: Deprecate IPAddressField in favour of GenericIPAddressField
-------------------------------------+-------------------------------------
Reporter: erikr | Owner: nobody

Type: | Status: new
Cleanup/optimization | Version: master
Component: Forms | Resolution:
Severity: Normal | Triage Stage:
Keywords: dceu13 | Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by carbonXT):

* cc: mike@… (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/20439#comment:6>

Django

unread,
Aug 28, 2013, 11:20:20 AM8/28/13
to django-...@googlegroups.com
#20439: Deprecate IPAddressField in favour of GenericIPAddressField
-------------------------------------+-------------------------------------
Reporter: erikr | Owner: nobody

Type: | Status: new
Cleanup/optimization | Version: master
Component: Database layer | Resolution:
(models, ORM) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 0
Keywords: dceu13 | Patch needs improvement: 0
Has patch: 0 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by timo):

* 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>

Django

unread,
Sep 6, 2013, 8:41:40 AM9/6/13
to django-...@googlegroups.com
#20439: Deprecate IPAddressField in favour of GenericIPAddressField
-------------------------------------+-------------------------------------
Reporter: erikr | Owner: erikr
Type: | Status: assigned

Cleanup/optimization | Version: master
Component: Database layer | Resolution:
(models, ORM) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 0
Keywords: dceu13 | Patch needs improvement: 0
Has patch: 0 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by erikr):

* status: new => assigned
* owner: nobody => erikr


--
Ticket URL: <https://code.djangoproject.com/ticket/20439#comment:8>

Django

unread,
Sep 28, 2013, 4:26:41 AM9/28/13
to django-...@googlegroups.com
#20439: Deprecate IPAddressField in favour of GenericIPAddressField
-------------------------------------+-------------------------------------
Reporter: erikr | Owner:
Type: | Status: new

Cleanup/optimization | Version: master
Component: Database layer | Resolution:
(models, ORM) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 0
Keywords: dceu13 | Patch needs improvement: 0
Has patch: 1 | UI/UX: 0

Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by erikr):

* 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>

Django

unread,
Sep 28, 2013, 4:45:06 AM9/28/13
to django-...@googlegroups.com
#20439: Deprecate IPAddressField in favour of GenericIPAddressField
-------------------------------------+-------------------------------------
Reporter: erikr | Owner:
Type: | Status: new
Cleanup/optimization | Version: master
Component: Database layer | Resolution:
(models, ORM) | Triage Stage: Ready for
Severity: Normal | checkin
Keywords: dceu13 | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* 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>

Django

unread,
Sep 28, 2013, 5:02:43 AM9/28/13
to django-...@googlegroups.com
#20439: Deprecate IPAddressField in favour of GenericIPAddressField
-------------------------------------+-------------------------------------
Reporter: erikr | Owner: Aymeric
Type: | Augustin <aymeric.augustin@…>
Cleanup/optimization | Status: closed
Component: Database layer | Version: master
(models, ORM) | Resolution: fixed
Severity: Normal | Triage Stage: Ready for
Keywords: dceu13 | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Aymeric Augustin <aymeric.augustin@…>):

* 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>

Django

unread,
Jan 19, 2015, 11:18:15 AM1/19/15
to django-...@googlegroups.com
#20439: Deprecate IPAddressField in favour of GenericIPAddressField
-------------------------------------+-------------------------------------
Reporter: erikr | Owner: Aymeric
Type: | Augustin <aymeric.augustin@…>
Cleanup/optimization | Status: closed
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: dceu13 | Triage Stage: Ready for

| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

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>

Reply all
Reply to author
Forward
0 new messages