#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 , 6 years ago
Has patch: | set |
---|
comment:2 by , 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 , 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 , 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 , 6 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
Django has been criticized for "needless deprecations" in the past, that's why I'm skeptical. I don't care much though.
PR