Opened 4 years ago
Last modified 2 years ago
#32565 new Cleanup/optimization
Extract URL resolver view strings mapping to admindocs
Description ¶
From discussion with Nick Pope: https://github.com/django/django/pull/14138#discussion_r595911054
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).
According to the ticket's flags, the next step(s) to move this issue forward are:
- To provide a patch by sending a pull request. Claim the ticket when you start working so that someone else doesn't duplicate effort. Before sending a pull request, review your work against the patch review checklist. Check the "Has patch" flag on the ticket after sending a pull request and include a link to the pull request in the ticket comment when making that update. The usual format is:
[https://github.com/django/django/pull/#### PR]
.
Change History (16)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
I had the thought that, at the very least, we could make generation lazy.
comment:3 by , 4 years ago
Triage Stage: | Unreviewed → Accepted |
---|
Negative from PyCharm: they are not using these attributes. And if they’re not I’m inclined to punt on no-one really is.
comment:5 by , 3 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:7 by , 3 years ago
Has patch: | set |
---|
comment:8 by , 3 years ago
Patch needs improvement: | set |
---|
comment:10 by , 3 years ago
Needs documentation: | set |
---|---|
Patch needs improvement: | set |
comment:11 by , 3 years ago
Needs documentation: | unset |
---|---|
Patch needs improvement: | unset |
Updated the patch and documented the changes.
comment:12 by , 3 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:16 by , 2 years ago
Has patch: | unset |
---|---|
Resolution: | fixed |
Status: | closed → new |
Triage Stage: | Ready for checkin → Accepted |
Patch was reverted.
Hmmm 🤔 — internally these are only used by admindocs. I wonder if they're not being used by tooling somewhere… (asked ref PyCharm for an initial data point.)