[Django] #24078: GenericIPAddressField is inconsistent with nulls

35 views
Skip to first unread message

Django

unread,
Jan 4, 2015, 11:55:47 PM1/4/15
to django-...@googlegroups.com
#24078: GenericIPAddressField is inconsistent with nulls
----------------------------------------------+--------------------
Reporter: jarshwah | Owner: nobody
Type: Bug | Status: new
Component: Database layer (models, ORM) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+--------------------
IP Addresses are stored as inet on postgres, so the empty string isn't
allowed. Instead, any empty strings are converted to nulls.

Oracle will then convert that null to the empty string once it's
retrieved, because GenericIPAddressField.empty_strings_allowed = True.
Other backends will return None.

I think the right thing to do is set empty_strings_allowed = False on
GenericIPAddressField, but I'm not sure if that'll have other
implications. I'll put together a patch later today.

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

Django

unread,
Jan 4, 2015, 11:56:06 PM1/4/15
to django-...@googlegroups.com
#24078: GenericIPAddressField is inconsistent with nulls
-------------------------------------+-------------------------------------
Reporter: jarshwah | Owner: jarshwah
Type: Bug | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* owner: nobody => jarshwah
* needs_better_patch: => 0
* status: new => assigned
* needs_tests: => 0
* needs_docs: => 0


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

Django

unread,
Jan 5, 2015, 5:35:48 AM1/5/15
to django-...@googlegroups.com
#24078: GenericIPAddressField is inconsistent with nulls
-------------------------------------+-------------------------------------
Reporter: jarshwah | Owner: jarshwah
Type: Bug | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* has_patch: 0 => 1
* stage: Unreviewed => Ready for checkin


Comment:

See PR https://github.com/django/django/pull/3840

Not sure if release notes are required, or if this could be considered a
backwards incompatible change.

--
Ticket URL: <https://code.djangoproject.com/ticket/24078#comment:2>

Django

unread,
Jan 5, 2015, 1:17:56 PM1/5/15
to django-...@googlegroups.com
#24078: GenericIPAddressField is inconsistent with nulls
-------------------------------------+-------------------------------------
Reporter: jarshwah | Owner: jarshwah
Type: Bug | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | 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 loic):

All bug fixes are backwards incompatible by nature, I don't think release
notes are required here.

LGTM.

--
Ticket URL: <https://code.djangoproject.com/ticket/24078#comment:3>

Django

unread,
Jan 7, 2015, 8:12:23 AM1/7/15
to django-...@googlegroups.com
#24078: GenericIPAddressField is inconsistent with nulls
-------------------------------------+-------------------------------------
Reporter: jarshwah | Owner: jarshwah
Type: Bug | Status: closed

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"5a4ac4ead986387216e0c0e1b4d4b6a537f87e0b"]:
{{{
#!CommitTicketReference repository=""
revision="5a4ac4ead986387216e0c0e1b4d4b6a537f87e0b"
Fixed #24078 -- Removed empty strings from GenericIPAddressField
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24078#comment:4>

Reply all
Reply to author
Forward
0 new messages