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 Jake Howard, 4 weeks 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, 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.

Last edited 4 weeks ago by Anže Pečar (previous) (diff)

comment:3 by Jacob Walls, 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 Anže Pečar, 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 Jacob Walls, 4 weeks ago

Component: Template systemDocumentation
Resolution: wontfix
Status: closednew
Triage Stage: UnreviewedAccepted
Type: BugCleanup/optimization

comment:6 by Jacob Walls, 4 weeks ago

Owner: set to Anže Pečar
Status: newassigned

comment:7 by Jacob Walls, 4 weeks ago

Triage Stage: AcceptedReady for checkin

comment:8 by GitHub <noreply@…>, 4 weeks ago

Resolution: fixed
Status: assignedclosed

In 25043486:

Fixed #37048, Refs #36728 -- Added release notes for changes to InclusionAdminNode and parse_bits().

Note: See TracTickets for help on using tickets.
Back to Top