[Django] #37142: Document and move django.utils.deprecation.django_file_prefixes

20 views
Skip to first unread message

Django

unread,
Jun 4, 2026, 11:24:43 AMJun 4
to django-...@googlegroups.com
#37142: Document and move django.utils.deprecation.django_file_prefixes
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Type:
| Cleanup/optimization
Status: new | Component: Utilities
Version: dev | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
I'm preparing a documentation section "Writing your own fetch mode" as
suggested in a
[https://github.com/django/django/pull/17554#discussion_r2345545473 review
of the feature].

Emitting a warning rather than an exception is the most obvious simple use
case. I'd like my example to skip over Django frames when emitting the
warning, just like we do for deprecations. So, I'd like to import and use
`django_file_prefixes()` for this.

But:
- it's not documented (except for the contributing documentation, see
9932866e3a7693930a90a924014c10614820ea70)
- it lives in `.deprecation`

We have 4 +1s for moving it out of `.deprecation` in this
[https://github.com/django/django/pull/19887#discussion_r2373952228 review
thread].

I propose to move it and document it (outside the contributor
documentation), to make it public API.
--
Ticket URL: <https://code.djangoproject.com/ticket/37142>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 4, 2026, 9:50:19 PMJun 4
to django-...@googlegroups.com
#37142: Document and move django.utils.deprecation.django_file_prefixes
--------------------------------------+------------------------------------
Reporter: Jacob Walls | Owner: zky
Type: Cleanup/optimization | Status: assigned
Component: Utilities | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by zky):

* owner: (none) => zky
* stage: Unreviewed => Accepted
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/37142#comment:1>

Django

unread,
Jun 5, 2026, 3:06:56 AMJun 5
to django-...@googlegroups.com
#37142: Document and move django.utils.deprecation.django_file_prefixes
--------------------------------------+------------------------------------
Reporter: Jacob Walls | Owner: pradhvan
Type: Cleanup/optimization | Status: assigned
Component: Utilities | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by pradhvan):

* owner: zky => pradhvan

--
Ticket URL: <https://code.djangoproject.com/ticket/37142#comment:2>

Django

unread,
Jun 5, 2026, 3:07:33 AMJun 5
to django-...@googlegroups.com
#37142: Document and move django.utils.deprecation.django_file_prefixes
--------------------------------------+------------------------------------
Reporter: Jacob Walls | Owner: zky
Type: Cleanup/optimization | Status: assigned
Component: Utilities | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by pradhvan):

* owner: pradhvan => zky

--
Ticket URL: <https://code.djangoproject.com/ticket/37142#comment:3>

Django

unread,
Jun 6, 2026, 4:32:21 AMJun 6
to django-...@googlegroups.com
#37142: Document and move django.utils.deprecation.django_file_prefixes
--------------------------------------+------------------------------------
Reporter: Jacob Walls | Owner: zky
Type: Cleanup/optimization | Status: assigned
Component: Utilities | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by zky):

* has_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/37142#comment:4>

Django

unread,
Jun 6, 2026, 4:33:53 AMJun 6
to django-...@googlegroups.com
#37142: Document and move django.utils.deprecation.django_file_prefixes
--------------------------------------+------------------------------------
Reporter: Jacob Walls | Owner: zky
Type: Cleanup/optimization | Status: assigned
Component: Utilities | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by zky):

https://github.com/django/django/pull/21423
--
Ticket URL: <https://code.djangoproject.com/ticket/37142#comment:5>

Django

unread,
Jun 9, 2026, 3:03:32 PMJun 9
to django-...@googlegroups.com
#37142: Document and move django.utils.deprecation.django_file_prefixes
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: zky
Type: | Status: assigned
Cleanup/optimization |
Component: Utilities | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/37142#comment:6>

Django

unread,
Jun 10, 2026, 10:17:45 AMJun 10
to django-...@googlegroups.com
#37142: Document and move django.utils.deprecation.django_file_prefixes
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: zky
Type: | Status: closed
Cleanup/optimization |
Component: Utilities | Version: dev
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls <jacobtylerwalls@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"f970a98e464320c09dde8d45009eadfb4d038a57" f970a98e]:
{{{#!CommitTicketReference repository=""
revision="f970a98e464320c09dde8d45009eadfb4d038a57"
Fixed #37142 -- Moved django_file_prefixes() to django.utils.warnings.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/37142#comment:7>
Reply all
Reply to author
Forward
0 new messages