Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#29703 closed Cleanup/optimization (fixed)

Deprecate undocumented QuerySetPaginator

Reported by: Nick Pope Owned by: Nick Pope
Component: Core (Other) Version: dev
Severity: Normal Keywords: paginator, queryset, deprecation
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

QuerySetPaginator was merged into Paginator over 10 years ago before the release of Django 1.0, at which point it was undocumented but aliased for backward compatibility.

I would have suggested just removing it, but curiously it seems that people are still using it quite a lot. We should formalize the deprecation.

Change History (7)

comment:1 by Nick Pope, 6 years ago

Has patch: set

comment:2 by Tim Graham, 6 years ago

I don't think it's worth the churn. A one line alias isn't adding any maintenance overhead or clutter.

comment:3 by Jon Dufresne, 6 years ago

I think having an undocumented alias would only lead to confusion if it were used. Removing it better follows the zen of Python "There should be one-- and preferably only one --obvious way to do it.".

+1 for deprecating and removing.

comment:4 by Carlton Gibson, 6 years ago

We should formalize the deprecation.

Is there any way of estimating of those search results how many are still being updated? (I suspect a lot are not...)

Question: given that it's 10 years old and the fix would just be a search and replace operation, could we not just remove it and mark it as a breaking change?

comment:5 by Tim Graham, 6 years ago

Triage Stage: UnreviewedReady for checkin

Django has been criticized for "needless deprecations" in the past, that's why I'm skeptical. I don't care much though.

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

Resolution: fixed
Status: assignedclosed

In ed4bfac:

Fixed #29703 -- Deprecated QuerySetPaginator alias.

Unused since 4406d283e13819b04556df21044089b7d119edb0.

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

In 81993b47:

Refs #29703 -- Removed QuerySetPaginator alias per deprecation timeline.

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