-
Notifications
You must be signed in to change notification settings - Fork 468
deps: update to django5 #6452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deps: update to django5 #6452
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
074f8f9 to
f466b13
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
4daf736 to
bafcaff
Compare
matthewelwell
left a comment
There was a problem hiding this 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.
api/app_analytics/migrations/0007_rename_environment_id_created_at_index.py
Show resolved
Hide resolved
api/users/migrations/0045_add_through_fields_metadata_for_django_5_upgrade.py
Show resolved
Hide resolved
Docker builds report
|
khvn26
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Changes
Depends on:
deps: update django to 5.2.9 flagsmith-common#149Upgrade 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: ignorecomments where needed.The main breaking changes that required handling on our end were:
Model.Meta.index_togetherwas removed. I've replaced usages of this withmodels.Index(fields=[...]). This change does result in a migration applied to the database in the form of aRenameIndexbut 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.django.utils.timezone.utcwas removed. I've replaced this withdatetime.timezone.utc, but since we still want to usedjango.utils.timezonefor other logic, (e.g.timezone.now()), I've importeddatetime.timezoneasdttzwhere needed.I also had to update a few dependencies to support the django upgrade:
Note that the upgrade of django-debug-toolbar meant that I needed to remove
DEBUG = Truefrom the test settings (conversation on the actual LoC for clarification).How did you test this code?
Unit tests, and running locally.