Opened 3 hours ago

Closed 2 hours ago

Last modified 101 minutes ago

#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 Jake Howard, 2 hours ago

Resolution: wontfix
Status: newclosed

After some digging, InclusionAdminNode isn't a public API, so doesn't have any compatibility guarantees. A similar backwards-incompatible change was made to parse_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.

comment:2 by Anže Pečar, 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.

Last edited 101 minutes ago by Anže Pečar (previous) (diff)
Note: See TracTickets for help on using tickets.
Back to Top