Opened 3 weeks ago

Closed 3 weeks ago

Last modified 3 weeks ago

#37381 closed Bug (fixed)

Invalid module references in the documentation

Reported by: Tim Schilling Owned by: David Smith
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This ticket is for David Smith's ​PR which covers a few cases where the module references are incorrect in the documentation. I created the ticket to help signal to others that this can be picked up.

I used Claude to determine the following errors still need to be fixed. The rest from David's work were merged in other changes.

File: docs/internals/deprecation.txt:945
Current (wrong): django.template.backends.base.Template.render()
Should be: django.template.base.Template.render()
────────────────────────────────────────
File: docs/ref/templates/api.txt:37
Current (wrong): django.template.backends.base.Template.render
Should be: django.template.base.Template.render
────────────────────────────────────────
File: docs/releases/1.10.txt:1320
Current (wrong): django.template.backends.base.Template.render
Should be: django.template.base.Template.render
────────────────────────────────────────
File: docs/topics/templates.txt:369
Current (wrong): django.template.backends.base
Should be: django.template.base
────────────────────────────────────────
File: docs/releases/2.0.txt:283
Current (wrong): django.db.backends.base.DatabaseWrapper.execute_wrapper
Should be: django.db.backends.base.base.BaseDatabaseWrapper.execute_wrapper
────────────────────────────────────────
File: docs/topics/db/instrumentation.txt:99
Current (wrong): django.db.backends.base.DatabaseWrapper
Should be: django.db.backends.base.base.BaseDatabaseWrapper

Change History (5)

comment:1 by Tim Schilling, 3 weeks ago

Patch needs improvement: set

comment:2 by Natalia Bidart, 3 weeks ago

Owner: changed from Django Sprints to David Smith
Patch needs improvement: unset
Triage Stage: Unreviewed → Accepted

Thanks Tim for the ticket, I'm accepting for the execute_wrapper() reference. While working through the ticket to understand the issue, I rebased PR 16294 onto main and cleaned it up, then pushed the result to the PR, following Tim's 2022 review comments.

The cache changes were already merged in c3862735cd. I dropped the template changes: as Tim pointed out in review, django.template.base.Template isn't the Template returned by each backend. topics/templates.txt documents the backend-agnostic render(context=None, request=None) protocol, and retargeting it would make the deprecation and 1.10 notes and ref/templates/api.txt point at the DTL engine's render(context) instead.

comment:3 by Natalia Bidart, 3 weeks ago

Triage Stage: Accepted → Ready for checkin

comment:4 by nessita <124304+nessita@…>, 3 weeks ago

Resolution: → fixed
Status: assigned → closed

In 0ae93a02:

Fixed #37381 -- Corrected execute_wrapper() module reference in docs.

The currentmodule directive used django.db.backends.base.DatabaseWrapper,
which is not a real module path. Documented the method on the public
django.db.connection object instead, consistent with the cache docs.

Also indented the method description so it renders as the method body.

Thanks Tim Graham for the review and Tim Schilling for the ticket.

Co-authored-by: Natalia <124304+nessita@…>

comment:5 by Natalia <124304+nessita@…>, 3 weeks ago

In 8dbd89a6:

[6.1.x] Fixed #37381 -- Corrected execute_wrapper() module reference in docs.

The currentmodule directive used django.db.backends.base.DatabaseWrapper,
which is not a real module path. Documented the method on the public
django.db.connection object instead, consistent with the cache docs.

Also indented the method description so it renders as the method body.

Thanks Tim Graham for the review and Tim Schilling for the ticket.

Co-authored-by: Natalia <124304+nessita@…>

Backport of 0ae93a02e55ec42dfde251fc5500b3ec617a4200 from main.

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