#32665: caches.W002 check does not support tuples in STATICFILES_DIRS -----------------------------------------+------------------------ Reporter: jaredlockhart | Owner: nobody Type: Uncategorized | Status: new Component: Uncategorized | Version: 3.2 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 | -----------------------------------------+------------------------ The caches.W002 check defined here:
https://github.com/django/django/blob/76c0b32f826469320c59709d31e2f2126dd7c505/django/core/checks/caches.py#L22-L55 inspects the values of each entry in STATICFILES_DIRS here: https://github.com/django/django/blob/76c0b32f826469320c59709d31e2f2126dd7c505/django/core/checks/caches.py#L30-L33 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 -- Ticket URL: <https://code.djangoproject.com/ticket/32665> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/056.2db06f1e5b317edc0b5471e8c34ff4fa%40djangoproject.com.