#37048 closed Bug (wontfix)
Backwards incompatible change to InclusionAdminNode
| Reported by: | Anže Pečar | Owned by: | |
|---|---|---|---|
| Component: | Template system | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| 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 (2)
comment:1 by , 2 hours ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
comment:2 by , 102 minutes 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.
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.