Skip to content

Conversation

@matthewelwell
Copy link
Contributor

@matthewelwell matthewelwell commented Dec 31, 2025

Changes

Depends on:

Upgrade to django 5.

There were seemingly very few changes that were needed, and most of the updates in this PR relate to typing updates which I've tried to fix where possible but erred on the side of type: ignore comments where needed.

The main breaking changes that required handling on our end were:

  1. Model.Meta.index_together was removed. I've replaced usages of this with models.Index(fields=[...]). This change does result in a migration applied to the database in the form of a RenameIndex but from what I can tell, this is a very minor operation and doesn't require any locks on the data in the table, or the index, only on the metadata for the table.
  2. django.utils.timezone.utc was removed. I've replaced this with datetime.timezone.utc, but since we still want to use django.utils.timezone for other logic, (e.g. timezone.now()), I've imported datetime.timezone as dttz where needed.

I also had to update a few dependencies to support the django upgrade:

  1. django-debug-toolbar
  2. django-softdelete
  3. djoser

Note that the upgrade of django-debug-toolbar meant that I needed to remove DEBUG = True from the test settings (conversation on the actual LoC for clarification).

How did you test this code?

Unit tests, and running locally.

@vercel
Copy link

vercel bot commented Dec 31, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Feb 2, 2026 3:12pm
flagsmith-frontend-preview Ignored Ignored Preview Feb 2, 2026 3:12pm
flagsmith-frontend-staging Ignored Ignored Preview Feb 2, 2026 3:12pm

Request Review

@github-actions github-actions bot added api Issue related to the REST API dependencies Pull requests that update a dependency file and removed dependencies Pull requests that update a dependency file labels Dec 31, 2025
@github-actions github-actions bot added dependencies Pull requests that update a dependency file and removed dependencies Pull requests that update a dependency file labels Dec 31, 2025
@codecov
Copy link

codecov bot commented Dec 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.19%. Comparing base (608ef49) to head (db82530).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6452      +/-   ##
==========================================
+ Coverage   98.18%   98.19%   +0.01%     
==========================================
  Files        1294     1297       +3     
  Lines       46994    47001       +7     
==========================================
+ Hits        46141    46153      +12     
+ Misses        853      848       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions bot added dependencies Pull requests that update a dependency file and removed dependencies Pull requests that update a dependency file labels Dec 31, 2025
@github-actions github-actions bot added dependencies Pull requests that update a dependency file and removed dependencies Pull requests that update a dependency file labels Dec 31, 2025
Copy link
Contributor Author

@matthewelwell matthewelwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments for context where needed.

@matthewelwell matthewelwell marked this pull request as ready for review January 2, 2026 11:51
@matthewelwell matthewelwell requested a review from a team as a code owner January 2, 2026 11:51
@matthewelwell matthewelwell requested review from gagantrivedi and removed request for a team January 2, 2026 11:51
@github-actions github-actions bot added dependencies Pull requests that update a dependency file and removed dependencies Pull requests that update a dependency file labels Jan 2, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2026

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-private-cloud:pr-6452 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-e2e:pr-6452 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-frontend:pr-6452 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-api-test:pr-6452 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-6452 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-6452 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-6452 Finished ✅ Results

@github-actions github-actions bot added dependencies Pull requests that update a dependency file and removed dependencies Pull requests that update a dependency file labels Jan 21, 2026
@github-actions github-actions bot added dependencies Pull requests that update a dependency file and removed dependencies Pull requests that update a dependency file labels Jan 21, 2026
@matthewelwell matthewelwell requested review from a team and khvn26 and removed request for a team and gagantrivedi January 21, 2026 17:56
@github-actions github-actions bot added dependencies Pull requests that update a dependency file and removed dependencies Pull requests that update a dependency file labels Jan 21, 2026
@github-actions github-actions bot added dependencies Pull requests that update a dependency file and removed dependencies Pull requests that update a dependency file labels Feb 2, 2026
@github-actions github-actions bot added dependencies Pull requests that update a dependency file and removed dependencies Pull requests that update a dependency file labels Feb 2, 2026
Copy link
Member

@khvn26 khvn26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@matthewelwell matthewelwell merged commit 7c76777 into main Feb 3, 2026
31 checks passed
@matthewelwell matthewelwell deleted the deps/django-5-upgrade branch February 3, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Issue related to the REST API dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants