Opened 4 weeks ago
Closed 4 weeks ago
#37048 closed Cleanup/optimization (fixed)
Backwards incompatible change to InclusionAdminNode
| Reported by: | Anže Pečar | Owned by: | Anže Pečar |
|---|---|---|---|
| Component: | Documentation | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
#36728 introduced a backwards incompatible change to the InclusionAdminNode: https://github.com/django/django/pull/20086/changes#diff-f60f94cb07bce796697e9d0357602fd6675a9891eaa57b8bd4cb70ae4ee3dda4R14
Instantiating InclusionAdminNode() without the name argument causes a crash. Example of usage from the django-unfold 3rd party library: https://github.com/unfoldadmin/django-unfold/blob/main/src/unfold/templatetags/unfold_list.py#L409-L414
From what I can tell the name argument is only used in the error message so maybe we can make it optional?
Change History (8)
comment:1 by , 4 weeks ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
comment:2 by , 4 weeks ago
Since InclusionAdminNode is used in the wild should we at last include a note about the change in the changelog? I'd be happy to open a PR for that.
comment:3 by , 4 weeks ago
Sure, we can add it to the "Backwards incompatible changes in 6.1" section in the release note. We usually add a disclaimer like "the undocumented InclusionAdminNode ..."
comment:4 by , 4 weeks ago
Thank you Jacob, I've created a PR with the documentation changes: https://github.com/django/django/pull/21135
comment:5 by , 4 weeks ago
| Component: | Template system → Documentation |
|---|---|
| Resolution: | wontfix |
| Status: | closed → new |
| Triage Stage: | Unreviewed → Accepted |
| Type: | Bug → Cleanup/optimization |
comment:6 by , 4 weeks ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:7 by , 4 weeks ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
After some digging,
InclusionAdminNodeisn't a public API, so doesn't have any compatibility guarantees. A similar backwards-incompatible change was made toparse_bits. Neither are mentioned in the 6.1 release notes.I spoke to Jacob at Djangocon Europe, and we agreed that since it's not part of the public API, it's not something we should be fixing. The work-around would be to change the arguments passed depending on the version, which shouldn't be too much hassle.