Django 5.2 prep: STORAGES dict + drop USE_L10N (#1081) - #1202
Conversation
Forward-compatible settings changes that behave identically on the current Django 4.2 runtime and unblock the 5.2 upgrade: - Replace DEFAULT_FILE_STORAGE (removed in Django 5.1) with the STORAGES dict. STORAGES has been supported since Django 4.2, so this is a no-op on the live runtime; the S3 (django-storages) vs FileSystemStorage selection is preserved. - Remove USE_L10N (removed in Django 5.0; localized formatting is always on). The other 5.0/5.1 landmines from the plan are already clean in this codebase (no `django.utils.timezone.utc`, no `index_together`, no removed util imports). Refs #1081. NOTE: the STORAGES change touches the prod S3 media path — validate media upload/serve on test.unglue.it before merge. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fm18PoiZmSo2iJGWHuVNm4
|
🤖 Codex review: LGTM (no changes). Confirmed: |
|
|
First concrete step toward the Django 4.2 → 5.2 LTS upgrade (#1081). Forward-compatible settings changes that behave identically on the current 4.2 runtime and remove two 5.x landmines.
Changes
STORAGESdict replacesDEFAULT_FILE_STORAGE(removed in Django 5.1).STORAGESis supported since 4.2, so this is a no-op on the live runtime; the S3 (django-storages) vsFileSystemStorageselection is preserved.USE_L10N(removed in Django 5.0; localized formatting is always on).Why it's small
The other landmines from
PLAN_django52_upgrade.mdare already clean here: nodjango.utils.timezone.utc, noindex_together, no removed util imports (force_text/ugettext/…). The real remaining work is the dependency audit (django-selectable,django-registration, ckeditor5) — separate PRs.The
STORAGESchange touches the prod S3 media path. Confirm media upload + serve on test.unglue.it before merging (per the plan's "test, don't just rename").No code reads
settings.DEFAULT_FILE_STORAGEdirectly (checked), and noSTATICFILES_STORAGEwas set, so static handling is unchanged.