[Django] #29703: Deprecate undocumented QuerySetPaginator

6 views
Skip to first unread message

Django

unread,
Aug 22, 2018, 3:22:27 PM8/22/18
to django-...@googlegroups.com
#29703: Deprecate undocumented QuerySetPaginator
-------------------------------------+-------------------------------------
Reporter: Nick Pope | Owner: Nick Pope
Type: | Status: assigned
Cleanup/optimization |
Component: Core | Version: master
(Other) | Keywords: paginator,
Severity: Normal | queryset, deprecation
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
{{{QuerySetPaginator}}} was
[https://github.com/django/django/commit/4406d283e13819b04556df21044089b7d119edb0
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
[https://github.com/search?utf8=%E2%9C%93&q=QuerySetPaginator+extension%3Apy&type=Code
still using it quite a lot]. We should formalize the deprecation.

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

Django

unread,
Aug 22, 2018, 3:31:27 PM8/22/18
to django-...@googlegroups.com
#29703: Deprecate undocumented QuerySetPaginator
-------------------------------------+-------------------------------------
Reporter: Nick Pope | Owner: Nick Pope
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: paginator, | Triage Stage:
queryset, deprecation | Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Nick Pope):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/10330 PR]

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

Django

unread,
Aug 22, 2018, 9:45:49 PM8/22/18
to django-...@googlegroups.com
#29703: Deprecate undocumented QuerySetPaginator
-------------------------------------+-------------------------------------
Reporter: Nick Pope | Owner: Nick Pope
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: paginator, | Triage Stage:
queryset, deprecation | Unreviewed
Has patch: 1 | Needs documentation: 0

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

Comment (by Tim Graham):

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

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

Django

unread,
Aug 26, 2018, 5:05:05 PM8/26/18
to django-...@googlegroups.com
#29703: Deprecate undocumented QuerySetPaginator
-------------------------------------+-------------------------------------
Reporter: Nick Pope | Owner: Nick Pope
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: paginator, | Triage Stage:
queryset, deprecation | Unreviewed
Has patch: 1 | Needs documentation: 0

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

Comment (by Jon Dufresne):

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.

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

Django

unread,
Aug 27, 2018, 4:54:24 AM8/27/18
to django-...@googlegroups.com
#29703: Deprecate undocumented QuerySetPaginator
-------------------------------------+-------------------------------------
Reporter: Nick Pope | Owner: Nick Pope
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: paginator, | Triage Stage:
queryset, deprecation | Unreviewed
Has patch: 1 | Needs documentation: 0

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

Comment (by Carlton Gibson):

> 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?

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

Django

unread,
Aug 27, 2018, 3:00:18 PM8/27/18
to django-...@googlegroups.com
#29703: Deprecate undocumented QuerySetPaginator
-------------------------------------+-------------------------------------
Reporter: Nick Pope | Owner: Nick Pope
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: paginator, | Triage Stage: Ready for
queryset, deprecation | checkin
Has patch: 1 | Needs documentation: 0

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

* stage: Unreviewed => Ready for checkin


Comment:

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

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

Django

unread,
Aug 27, 2018, 4:51:38 PM8/27/18
to django-...@googlegroups.com
#29703: Deprecate undocumented QuerySetPaginator
-------------------------------------+-------------------------------------
Reporter: Nick Pope | Owner: Nick Pope
Type: | Status: closed

Cleanup/optimization |
Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed

Keywords: paginator, | Triage Stage: Ready for
queryset, deprecation | checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

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


Comment:

In [changeset:"ed4bfacb3c942d0d32795e1a733b1b9367afd2e9" ed4bfac]:
{{{
#!CommitTicketReference repository=""
revision="ed4bfacb3c942d0d32795e1a733b1b9367afd2e9"
Fixed #29703 -- Deprecated QuerySetPaginator alias.

Unused since 4406d283e13819b04556df21044089b7d119edb0.
}}}

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

Django

unread,
Sep 10, 2019, 6:19:57 AM9/10/19
to django-...@googlegroups.com
#29703: Deprecate undocumented QuerySetPaginator
-------------------------------------+-------------------------------------
Reporter: Nick Pope | Owner: Nick Pope
Type: | Status: closed
Cleanup/optimization |
Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed
Keywords: paginator, | Triage Stage: Ready for
queryset, deprecation | checkin
Has patch: 1 | Needs documentation: 0

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

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

In [changeset:"81993b47eaac3cea1ebbc610a3a6b824f5195523" 81993b47]:
{{{
#!CommitTicketReference repository=""
revision="81993b47eaac3cea1ebbc610a3a6b824f5195523"
Refs #29703 -- Removed QuerySetPaginator alias per deprecation timeline.
}}}

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

Reply all
Reply to author
Forward
0 new messages