`URLResolver._is_callback()` , `URLResolver._callback_strs`, and
`URLPattern.lookup_str` all exist only to power `django.contrib.admindocs`
functionality, and are all private attributes. The functionality they
provide could be extracted into `admindocs` to avoid the overhead of
storing extra strings per URL in projects not using admindocs (in my
experience, that is most projects).
--
Ticket URL: <https://code.djangoproject.com/ticket/32565>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Carlton Gibson):
Hmmm 🤔 — internally these are only used by admindocs. I wonder if they're
not being used by tooling somewhere…
([https://twitter.com/carltongibson/status/1372504179642601473 asked ref
PyCharm for an initial data point].)
--
Ticket URL: <https://code.djangoproject.com/ticket/32565#comment:1>
Comment (by Adam Johnson):
I had the thought that, at the very least, we could make generation lazy.
--
Ticket URL: <https://code.djangoproject.com/ticket/32565#comment:2>
* stage: Unreviewed => Accepted
Comment:
Negative from PyCharm: they are not using these attributes. And if they’re
not I’m inclined to punt on no-one really is.
--
Ticket URL: <https://code.djangoproject.com/ticket/32565#comment:3>
Comment (by Alokik Roy):
Hi everyone, I would like to work on this ticket and already have started
the process too. But I had one doubt while I was trying to solve the issue
was that the URLreslove._is_callback() functionality also gets used in
tests too. I am new to contributions and wanted to know should I also work
on fixing tests too or just admindocs.py file and resolve.py file only.
--
Ticket URL: <https://code.djangoproject.com/ticket/32565#comment:4>
* owner: nobody => Alokik Roy
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/32565#comment:5>
Comment (by Alokik Roy):
PR
[https://github.com/django/django/pull/15510]
--
Ticket URL: <https://code.djangoproject.com/ticket/32565#comment:6>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/32565#comment:7>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/32565#comment:8>
* needs_better_patch: 1 => 0
Comment:
Suggested Changes Implemented!
--
Ticket URL: <https://code.djangoproject.com/ticket/32565#comment:9>
* needs_better_patch: 0 => 1
* needs_docs: 0 => 1
Comment:
[https://github.com/django/django/pull/15510#pullrequestreview-954585457
Small comments on PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/32565#comment:10>
* needs_better_patch: 1 => 0
* needs_docs: 1 => 0
Comment:
Updated the patch and documented the changes.
--
Ticket URL: <https://code.djangoproject.com/ticket/32565#comment:11>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/32565#comment:12>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"7f3cfaa12b28d15c0ca78bb692bfd6e59d17bff1" 7f3cfaa1]:
{{{
#!CommitTicketReference repository=""
revision="7f3cfaa12b28d15c0ca78bb692bfd6e59d17bff1"
Fixed #32565 -- Moved internal URLResolver view-strings mapping to
admindocs.
Moved the functionality of URLResolver._is_callback(),
URLResolver._callback_strs, URLPattern.lookup_str() to
django.contrib.admindocs.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32565#comment:13>
Comment (by GitHub <noreply@…>):
In [changeset:"974942a75039ba43e618f6a5ff95e08b5d5176fd" 974942a7]:
{{{
#!CommitTicketReference repository=""
revision="974942a75039ba43e618f6a5ff95e08b5d5176fd"
Fixed #33955, Fixed #33971 -- Reverted "Fixed #32565 -- Moved internal
URLResolver view-strings mapping to admindocs."
This reverts commit 7f3cfaa12b28d15c0ca78bb692bfd6e59d17bff1.
Thanks Tom Carrick and Greg Kaleka for reports.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32565#comment:14>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"a1083805acc952419752bc8fd860bfda83af42d2" a108380]:
{{{
#!CommitTicketReference repository=""
revision="a1083805acc952419752bc8fd860bfda83af42d2"
[4.1.x] Fixed #33955, Fixed #33971 -- Reverted "Fixed #32565 -- Moved
internal URLResolver view-strings mapping to admindocs."
This reverts commit 7f3cfaa12b28d15c0ca78bb692bfd6e59d17bff1.
Thanks Tom Carrick and Greg Kaleka for reports.
Backport of 974942a75039ba43e618f6a5ff95e08b5d5176fd from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32565#comment:15>
* status: closed => new
* has_patch: 1 => 0
* resolution: fixed =>
* stage: Ready for checkin => Accepted
Comment:
Patch was reverted.
--
Ticket URL: <https://code.djangoproject.com/ticket/32565#comment:16>