Opened 16 months ago

Closed 14 months ago

Last modified 2 months ago

#29598 closed Bug (fixed)

contrib.postgres.FloatRangeField should be renamed DecimalRangeField

Reported by: Simon Charette Owned by: Stefano Chiodino
Component: contrib.postgres Version: master
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 Changed 16 months ago by Carlton Gibson

Triage Stage: UnreviewedAccepted

comment:2 Changed 16 months ago by Rowan

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 Changed 16 months ago by Simon Charette

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

comment:4 Changed 16 months ago by Tim Graham

See Deprecating a feature for a checklist of tasks.

comment:5 Changed 14 months ago by Stefano Chiodino

Owner: changed from Rowan to Stefano Chiodino

comment:6 Changed 14 months ago by Stefano Chiodino

Has patch: set
Last edited 14 months ago by Tim Graham (previous) (diff)

comment:7 Changed 14 months ago by Tim Graham

Patch needs improvement: set

comment:8 Changed 14 months ago by Vishvajit Pathak

Cc: Vishvajit Pathak added

comment:9 Changed 14 months ago by Tim Graham

Patch needs improvement: unset

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

comment:10 Changed 14 months ago by Simon Charette

Triage Stage: AcceptedReady for checkin

I couldn't identify any blocker. LGTM.

comment:11 Changed 14 months ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In 6de7f9e:

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

comment:12 Changed 2 months ago by Mariusz Felisiak <felisiak.mariusz@…>

In b47bb4c4:

Refs #29598 -- Removed FloatRangeField per deprecation timeline.

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