[Django] #29598: contrib.postgres.FloatRangeField should be renamed DecimalRangeField

15 views
Skip to first unread message

Django

unread,
Jul 25, 2018, 7:02:41 PM7/25/18
to django-...@googlegroups.com
#29598: contrib.postgres.FloatRangeField should be renamed DecimalRangeField
--------------------------------------------+------------------------
Reporter: Simon Charette | Owner: (none)
Type: Bug | Status: new
Component: contrib.postgres | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
--------------------------------------------+------------------------
As discovered in https://code.djangoproject.com/ticket/25591#comment:6
`FloatRangeField` uses `numrange` as database type which is not
appropriate to store doubles/floats which is what `FloatField` uses.

`DecimalField` on the other hand uses `numeric` as datatype which makes a
better abstraction resolution. I suggest we keep `class
FloatRangeField(DecimalRangeField)` field around with warning on
`__init__` during the deprecation period.

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

Django

unread,
Jul 26, 2018, 4:29:32 AM7/26/18
to django-...@googlegroups.com
#29598: contrib.postgres.FloatRangeField should be renamed DecimalRangeField
----------------------------------+------------------------------------

Reporter: Simon Charette | Owner: (none)
Type: Bug | Status: new
Component: contrib.postgres | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by Carlton Gibson):

* stage: Unreviewed => Accepted


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

Django

unread,
Jul 26, 2018, 7:21:20 AM7/26/18
to django-...@googlegroups.com
#29598: contrib.postgres.FloatRangeField should be renamed DecimalRangeField
----------------------------------+------------------------------------
Reporter: Simon Charette | Owner: Rowan
Type: Bug | Status: assigned
Component: contrib.postgres | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by Rowan):

* owner: (none) => Rowan
* status: new => assigned


Comment:

I'd like to help out with this ticket. Should the docs reference the fact
that the field used to be called `FloatRangeField`, as well?

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

Django

unread,
Jul 26, 2018, 9:40:10 AM7/26/18
to django-...@googlegroups.com
#29598: contrib.postgres.FloatRangeField should be renamed DecimalRangeField
----------------------------------+------------------------------------
Reporter: Simon Charette | Owner: Rowan
Type: Bug | Status: assigned
Component: contrib.postgres | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
----------------------------------+------------------------------------

Comment (by Simon Charette):

Rowan, I think a note mentioning it would be useful.

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

Django

unread,
Jul 26, 2018, 10:00:38 AM7/26/18
to django-...@googlegroups.com
#29598: contrib.postgres.FloatRangeField should be renamed DecimalRangeField
----------------------------------+------------------------------------
Reporter: Simon Charette | Owner: Rowan
Type: Bug | Status: assigned
Component: contrib.postgres | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
----------------------------------+------------------------------------

Comment (by Tim Graham):

See [https://docs.djangoproject.com/en/dev/internals/contributing/writing-
code/submitting-patches/#deprecating-a-feature Deprecating a feature] for
a checklist of tasks.

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

Django

unread,
Sep 19, 2018, 9:06:04 AM9/19/18
to django-...@googlegroups.com
#29598: contrib.postgres.FloatRangeField should be renamed DecimalRangeField
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: Stefano
| Chiodino
Type: Bug | Status: assigned
Component: contrib.postgres | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Stefano Chiodino):

* owner: Rowan => Stefano Chiodino


--
Ticket URL: <https://code.djangoproject.com/ticket/29598#comment:5>

Django

unread,
Sep 19, 2018, 9:51:54 AM9/19/18
to django-...@googlegroups.com
#29598: contrib.postgres.FloatRangeField should be renamed DecimalRangeField
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: Stefano
| Chiodino
Type: Bug | Status: assigned
Component: contrib.postgres | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Stefano Chiodino):

* has_patch: 0 => 1


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

Django

unread,
Sep 19, 2018, 9:53:34 AM9/19/18
to django-...@googlegroups.com
#29598: contrib.postgres.FloatRangeField should be renamed DecimalRangeField
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: Stefano
| Chiodino
Type: Bug | Status: assigned
Component: contrib.postgres | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Stefano Chiodino):

https://github.com/django/django/pull/10415

--
Ticket URL: <https://code.djangoproject.com/ticket/29598#comment:7>

Django

unread,
Sep 19, 2018, 2:13:26 PM9/19/18
to django-...@googlegroups.com
#29598: contrib.postgres.FloatRangeField should be renamed DecimalRangeField
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: Stefano
| Chiodino
Type: Bug | Status: assigned
Component: contrib.postgres | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* needs_better_patch: 0 => 1

Django

unread,
Sep 29, 2018, 5:10:07 PM9/29/18
to django-...@googlegroups.com
#29598: contrib.postgres.FloatRangeField should be renamed DecimalRangeField
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: Stefano
| Chiodino
Type: Bug | Status: assigned
Component: contrib.postgres | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Vishvajit Pathak):

* cc: Vishvajit Pathak (added)


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

Django

unread,
Oct 2, 2018, 10:09:46 AM10/2/18
to django-...@googlegroups.com
#29598: contrib.postgres.FloatRangeField should be renamed DecimalRangeField
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: Stefano
| Chiodino
Type: Bug | Status: assigned
Component: contrib.postgres | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* needs_better_patch: 1 => 0


Comment:

I updated the pull request. Simon, could you review?

--
Ticket URL: <https://code.djangoproject.com/ticket/29598#comment:9>

Django

unread,
Oct 2, 2018, 3:00:32 PM10/2/18
to django-...@googlegroups.com
#29598: contrib.postgres.FloatRangeField should be renamed DecimalRangeField
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: Stefano
| Chiodino
Type: Bug | Status: assigned
Component: contrib.postgres | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

* stage: Accepted => Ready for checkin


Comment:

I couldn't identify any blocker. LGTM.

--
Ticket URL: <https://code.djangoproject.com/ticket/29598#comment:10>

Django

unread,
Oct 2, 2018, 7:17:45 PM10/2/18
to django-...@googlegroups.com
#29598: contrib.postgres.FloatRangeField should be renamed DecimalRangeField
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: Stefano
| Chiodino
Type: Bug | Status: closed
Component: contrib.postgres | Version: master
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: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

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


Comment:

In [changeset:"6de7f9ec60fbdc59797bc21803f16260bd203f04" 6de7f9e]:
{{{
#!CommitTicketReference repository=""
revision="6de7f9ec60fbdc59797bc21803f16260bd203f04"
Fixed #29598 -- Deprecated FloatRangeField in favor of DecimalRangeField.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29598#comment:11>

Django

unread,
Sep 10, 2019, 6:19:59 AM9/10/19
to django-...@googlegroups.com
#29598: contrib.postgres.FloatRangeField should be renamed DecimalRangeField
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: Stefano
| Chiodino
Type: Bug | Status: closed
Component: contrib.postgres | Version: master

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: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"b47bb4c4a74f926111bdad4a6daae14ceed6f2dd" b47bb4c4]:
{{{
#!CommitTicketReference repository=""
revision="b47bb4c4a74f926111bdad4a6daae14ceed6f2dd"
Refs #29598 -- Removed FloatRangeField per deprecation timeline.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29598#comment:12>

Reply all
Reply to author
Forward
0 new messages