Opened 60 minutes ago
#37142 new Cleanup/optimization
Document and move django.utils.deprecation.django_file_prefixes
| Reported by: | Jacob Walls | Owned by: | |
|---|---|---|---|
| Component: | Utilities | 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
I'm preparing a documentation section "Writing your own fetch mode" as suggested in a 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 review thread.
I propose to move it and document it (outside the contributor documentation), to make it public API.