[Django] #29640: Document (deprecate?) Paginator._get_page

12 views
Skip to first unread message

Django

unread,
Aug 5, 2018, 10:16:16 PM8/5/18
to django-...@googlegroups.com
#29640: Document (deprecate?) Paginator._get_page
-----------------------------------------+------------------------
Reporter: Josh Schneier | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 2.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
This has been undocumented since it was introduced in ~1.6 although it is
meant for public use to override the Page class used by a Paginator.

Assuming we keep it (is anyone using it?) I think I like something along
the approach of the generic views. We could add a `get_page_class` method
and a `page_class` attribute although I wonder if the latter isn't enough.
We'd need the former to maintain feature parity.

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

Django

unread,
Aug 5, 2018, 10:17:19 PM8/5/18
to django-...@googlegroups.com
#29640: Document (deprecate?) Paginator._get_page
-------------------------------------+-------------------------------------

Reporter: Josh Schneier | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version: 2.1
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Josh Schneier):

* component: Uncategorized => Core (Other)
* type: Uncategorized => Cleanup/optimization


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

Django

unread,
Aug 6, 2018, 4:52:26 AM8/6/18
to django-...@googlegroups.com
#29640: Document (deprecate?) Paginator._get_page
--------------------------------------+------------------------------------

Reporter: Josh Schneier | Owner: nobody
Type: Cleanup/optimization | Status: new

Component: Core (Other) | Version: 2.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Carlton Gibson):

* stage: Unreviewed => Accepted


Comment:

Moving to `get_page_class()` plus `page_class` seems reasonable.

* I know it's not ''public'' but maybe we should deprecate `_get_page()`,
since it's been around a while. (Tim?)
* If so, there's a slight wiggle: `_get_page()` returns the instance where
`get_page_class()` would presumably give us the class, which we then
instantiate in `page()`.

Not sure whether just having the attribute would be enough? Maybe someone
is customising for first or last page, as one thought. We may as well
leave it available (rather than needing to re-add it later.)

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

Django

unread,
Aug 7, 2018, 4:11:13 PM8/7/18
to django-...@googlegroups.com
#29640: Document (deprecate?) Paginator._get_page
--------------------------------------+------------------------------------
Reporter: Josh Schneier | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: 2.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Josh Schneier):

I regret suggesting `get_page` for the piece where we inlined the docs
now. Maybe something like `get_safe_page` would have been better. That is
a minor issue, I do wonder if that particular aspect of the functionality
is used.

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

Django

unread,
Mar 12, 2024, 3:26:16 AM3/12/24
to django-...@googlegroups.com
#29640: Document (deprecate?) Paginator._get_page
--------------------------------------+------------------------------------
Reporter: Josh Schneier | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: 2.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Ülgen Sarıkavak):

* cc: Ülgen Sarıkavak (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/29640#comment:4>
Reply all
Reply to author
Forward
0 new messages