-
Notifications
You must be signed in to change notification settings - Fork 467
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
base: main
Are you sure you want to change the base?
deps: update to django5 #6452
Changes from all commits
75ea651
29c5815
392dd99
048bc69
8d185aa
98dda95
4223e54
384497d
65b0e0d
bf2ccbb
79cf1ab
0622b3f
8a2e936
93e20f3
18a3e5d
1054669
07b1f64
f6c1c4c
e68f085
80de6a1
67f7303
5e485fa
211fc8f
b8c7230
fefa9f2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,5 +66,3 @@ | |
| """ | ||
|
|
||
| ENABLE_POSTPONE_DECORATOR = False | ||
|
|
||
| DEBUG = True | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Generated by Django 5.2.9 on 2025-12-31 15:34 | ||
|
|
||
| from django.db import migrations | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ("app_analytics", "0006_add_labels"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.RenameIndex( | ||
| model_name="apiusageraw", | ||
| new_name="app_analyti_environ_b61cad_idx", | ||
| old_fields=("environment_id", "created_at"), | ||
| ), | ||
|
Comment on lines
+13
to
+17
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Caused by deprecation of Since we don't reference the name of the index directly (although we might in specific oracle migrations 🤔) we shouldn't have any schema mismatch issues. |
||
| ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,8 @@ def remove_backup_code_command(user_id: Any, method_name: str, code: str) -> Non | |
| .values_list("_backup_codes", flat=True) | ||
| .first() | ||
| ) | ||
| if serialized_codes is None: # pragma: no cover | ||
| return | ||
|
Comment on lines
+14
to
+15
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added for typing reasons. |
||
| codes = MFAMethod._BACKUP_CODES_DELIMITER.join( | ||
| _remove_code_from_set( # type: ignore[arg-type] | ||
| backup_codes=set(serialized_codes.split(MFAMethod._BACKUP_CODES_DELIMITER)), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Generated by Django 5.2.9 on 2025-12-31 15:29 | ||
| from common.migrations.helpers import PostgresOnlyRunSQL | ||
| from django.db import migrations | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ("identities", "0005_revert_sanitized_identifiers"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.SeparateDatabaseAndState( | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we only added this index for postgres dbs (see here), we only want to rename it for those databases too. |
||
| state_operations=[ | ||
| migrations.RenameIndex( | ||
| model_name="identity", | ||
| new_name="environment_environ_341dc9_idx", | ||
| old_fields=("environment", "created_date"), | ||
| ), | ||
| ], | ||
| database_operations=[ | ||
| PostgresOnlyRunSQL( | ||
| 'ALTER INDEX "environments_identity_environment_id_created_date_idx" RENAME TO "environment_environ_341dc9_idx"', | ||
| reverse_sql='ALTER INDEX "environment_environ_341dc9_idx" RENAME TO "environments_identity_environment_id_created_date_idx"' | ||
| ) | ||
| ], | ||
| ) | ||
| ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -145,7 +145,7 @@ def dismiss_feature_health_event( | |
| FeatureHealthEvent.objects.create( | ||
| feature=feature_health_event.feature, | ||
| environment=feature_health_event.environment, | ||
| type=FeatureHealthEventType.HEALTHY, | ||
| type=FeatureHealthEventType.HEALTHY.value, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one was somewhat odd. I can't see any indication of any changes to this behaviour in the notes here, but looking at this test I do think it was wrong previously anyway. The error that I was seeing was that it couldn't create the event with the type as the literal string |
||
| reason=json.dumps(reason), | ||
| provider_name=feature_health_event.provider_name, | ||
| external_id=feature_health_event.external_id, | ||
|
|
||
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.
After the upgrade of django-debug-toolbar, this was causing issues because we only include the debug toolbar if
DEBUG is True(see here). As I understand it, it's because we don't also add it toinstalled_appshere which is now required (but seemingly wasn't in older versions of the package).I decided the better solution here was simply to remove the
DEBUG = Trueas I'm not sure why it existed here for tests in the first place.