Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#29598 closed Bug (fixed)

contrib.postgres.FloatRangeField should be renamed DecimalRangeField

Reported by: Simon Charette Owned by: Stefano Chiodino
Component: contrib.postgres Version: dev
Severity: Normal Keywords:
Cc: Vishvajit Pathak Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

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.

Change History (12)

comment:1 by Carlton Gibson, 6 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Rowan, 6 years ago

Owner: set to Rowan
Status: newassigned

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?

comment:3 by Simon Charette, 6 years ago

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

comment:4 by Tim Graham, 6 years ago

See Deprecating a feature for a checklist of tasks.

comment:5 by Stefano Chiodino, 6 years ago

Owner: changed from Rowan to Stefano Chiodino

comment:6 by Stefano Chiodino, 6 years ago

Has patch: set
Version 0, edited 6 years ago by Stefano Chiodino (next)

comment:7 by Tim Graham, 6 years ago

Patch needs improvement: set

comment:8 by Vishvajit Pathak, 6 years ago

Cc: Vishvajit Pathak added

comment:9 by Tim Graham, 6 years ago

Patch needs improvement: unset

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

comment:10 by Simon Charette, 6 years ago

Triage Stage: AcceptedReady for checkin

I couldn't identify any blocker. LGTM.

comment:11 by Tim Graham <timograham@…>, 6 years ago

Resolution: fixed
Status: assignedclosed

In 6de7f9e:

Fixed #29598 -- Deprecated FloatRangeField in favor of DecimalRangeField.

comment:12 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In b47bb4c4:

Refs #29598 -- Removed FloatRangeField per deprecation timeline.

Note: See TracTickets for help on using tickets.
Back to Top