Opened 3 weeks ago
Last modified 25 minutes ago
#37317 new Cleanup/optimization
Remove undocumented createcachetable <table_name…> support
| Reported by: | Mike Edmunds | Owned by: | |
|---|---|---|---|
| Component: | Core (Management commands) | Version: | 6.1 |
| Severity: | Normal | Keywords: | cache |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | yes |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
The createcachetable management command used to accept one or more table_name command-line arguments. That behavior was removed from the documentation in 1.7 when the command was changed to iterate over all CACHES (#15888), but the implementation is still in place with a "Legacy behavior" comment.
Retaining the undocumented legacy behavior adds maintenance burden (e.g., in implementing features like #36830) and creates potential confusion for users who might try to run createcachetable with a CACHES alias rather than a table name.
Suggest removing support for args in createcachetable, with deprecation notices (in case there are still some scripts out there relying on the legacy behavior).
Change History (12)
comment:1 by , 3 weeks ago
| Description: | modified (diff) |
|---|
comment:2 by , 3 weeks ago
comment:3 by , 3 weeks ago
I'll take this if accepted - deprecation warning for the positional table-name args, then removal in the following feature release.
comment:4 by , 3 weeks ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:5 by , 3 weeks ago
I've implemented the deprecation locally (warning, test, 6.2 notes, deprecation timeline). I'll open a PR once this is accepted.
comment:6 by , 2 weeks ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:7 by , 2 weeks ago
| Has patch: | set |
|---|
comment:9 by , 13 days ago
| Patch needs improvement: | set |
|---|
comment:10 by , 8 hours ago
| Owner: | removed |
|---|---|
| Status: | assigned → new |
comment:11 by , 8 hours ago
| Triage Stage: | Accepted → Unreviewed |
|---|
comment:12 by , 25 minutes ago
Since author closed their PR(https://github.com/django/django/pull/21952), instead of continuing to iterate over the reviews, I would love to take this this from here.
I agree with removing the undocumented positional arguments from
createcachetable. The legacy behavior appears to provide little value while adding maintenance and potential ambiguity with cache aliases. A deprecation path followed by removal seems reasonable.