#32665 closed Bug (fixed)
caches.W002 check does not support tuples in STATICFILES_DIRS
Reported by: | Jared Lockhart | Owned by: | Mariusz Felisiak |
---|---|---|---|
Component: | Core (System checks) | Version: | 3.2 |
Severity: | Release blocker | Keywords: | |
Cc: | christa | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
The caches.W002 check defined here:
inspects the values of each entry in STATICFILES_DIRS here:
and passes them to pathlib.Path(staticfiles_dir) which expects a string, however according to the documentation each entry in STATICFILES_DIRS may be either a string or a tuple:
https://docs.djangoproject.com/en/3.2/ref/settings/#prefixes-optional
If a STATICFILES_DIRS entry is provided as a tuple, this check fails with:
TypeError: expected str, bytes or os.PathLike object, not tuple
in python3.9/pathlib.py in _parse_args at line 680
Attachments (1)
Change History (7)
comment:1 by , 4 years ago
Cc: | added |
---|---|
Component: | Uncategorized → Core (System checks) |
Easy pickings: | set |
Severity: | Normal → Release blocker |
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Bug |
comment:2 by , 4 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 4 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Thanks for the report.
Regression in c36075ac1dddfa986340b1a5e15fe48833322372.
Reproduced at 413c15ef2e3d3958fb641a023bc1e2d15fb2b228.