chore(deps): upgrade Django 4.2 LTS -> 5.2 LTS - #2768
Merged
Conversation
Django 4.2 LTS is reaching extended support EOL. Bump to 5.2 LTS (supported until April 2028) before 4.2 stops receiving security fixes. Bumps: - Django 4.2.30 -> 5.2.13 - django-dbbackup 4.2.1 -> 5.3.0 (latest declares 5.2 support and requires django>=5.0) Code changes for 5.x compat: - Drop USE_L10N (removed in Django 5.0; localization is now always on) - Refresh stale doc URLs (en/3.2/, en/4.2/ -> en/5.2/) Verified no removed-API usage in the codebase: no index_together, force_text/smart_text, make_random_password, DEFAULT_FILE_STORAGE, STATICFILES_STORAGE, get_storage_class, LogoutView GET, PickleSerializer, or pytz-via-Django-tz patterns. The pytz dep is independent (used to validate /etc/timezone) and stays. All other deps (DRF 3.16.1, channels 4.3.1, drf-spectacular 0.29.0, whitenoise 6.8.2, django-stubs 6.0.3) already declare 5.2 support, so no other version bumps were needed. Validated: - uv lock resolves cleanly - ruff check clean - manage.py check clean - manage.py makemigrations --check --dry-run reports no schema drift - 105 non-integration tests pass - 12 integration tests pass (5 skipped, same as baseline) Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
vpetersson
marked this pull request as ready for review
April 29, 2026 05:52
4 tasks
vpetersson
added a commit
that referenced
this pull request
May 1, 2026
* fix(server): migrate dbbackup config to Django 5 STORAGES dict django-dbbackup v5.0 (pinned in #2768 alongside the Django 5 LTS upgrade) raises RuntimeError on import if the legacy DBBACKUP_STORAGE / DBBACKUP_STORAGE_OPTIONS settings are present: File ".../dbbackup/settings.py", line 13, in <module> raise RuntimeError(msg) RuntimeError: The settings DBBACKUP_STORAGE and DBBACKUP_STORAGE_OPTIONS have been deprecated in favor of using Django Storages configuration. This blocks every manage.py invocation (most visibly migrate during container start), since the dbbackup management commands import the package at registration time. Move the backup storage config into Django 5's STORAGES dict under the 'dbbackup' key. Defining STORAGES replaces the framework defaults entirely, so 'default' and 'staticfiles' are restated even though they match the global default — without them, file uploads and WhiteNoise-served staticfiles would lose their backends. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * fix(server): look up upstream branch via direct endpoint remote_branch_available() listed all branches via GET /branches and scanned for a name match, but that endpoint paginates at 30 results and returns them alphabetically. Once auto-generated branches (claude/*, dependabot/*, renovate/*) pushed past 30, master fell off the first page, the listing scan returned False, and every fetch_remote_hash() call logged "Remote Git branch not available" followed by is_up_to_date()'s "Unable to get latest version from GitHub". The Anthias repo currently has 81 branches. Switch to the per-branch endpoint GET /repos/screenly/anthias/branches/{branch}, which returns 200 if the branch exists and 404 if not, with no pagination. 404 is treated as a clean negative ("missing") and cached without triggering the generic error backoff. Other non-200 responses still go through handle_github_error(). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Issues Fixed
Django 4.2 LTS is reaching extended-support EOL. Bumping to the next LTS (5.2, supported until April 2028) before 4.2 stops receiving security fixes.
Description
Django 4.2.30 → 5.2.13 plus the dep bumps required to stay on declared-supported versions.
Dependency bumps
Django4.2.30 → 5.2.13django-dbbackup4.2.1 → 5.3.0 (latest; declares 5.2 support, requiresdjango>=5.0)All other Django-touching deps (DRF 3.16.1, channels 4.3.1, drf-spectacular 0.29.0, whitenoise 6.8.2, django-stubs 6.0.3) already declare 5.2 support, so no other bumps.
Code changes for 5.x compat
USE_L10N(removed in Django 5.0 — localization is now always on)docs.djangoproject.com/en/3.2/and/en/4.2/doc URLs to/en/5.2/Audit findings
The codebase doesn't touch any of the APIs Django 5.0/5.1/5.2 removed: no
index_together, noforce_text/smart_text, nomake_random_password, noDEFAULT_FILE_STORAGE/STATICFILES_STORAGE, noget_storage_class, noLogoutViewGET, noPickleSerializer, nolength_is. Thepytzdep is independent of Django's tz layer (used only to validate/etc/timezone), so it stays.Verified locally
uv lockresolves cleanly (only the two intended bumps)ruff checkcleanmanage.py checkclean — no system warningsmanage.py makemigrations --check --dry-run— no schema driftChecklist