Browse Source

Revert "Revert "ref: upgrade django to 4.2 (#53468)"" (#61354)

This reverts commit 271a7a8b75921cfd9c9f55918add29cb31fe110b.

<!-- Describe your PR here. -->
anthony sottile 1 year ago
parent
commit
055c655684

+ 1 - 1
requirements-base.txt

@@ -13,7 +13,7 @@ datadog>=0.44
 django-crispy-forms>=1.14.0
 django-csp>=3.7
 django-pg-zero-downtime-migrations>=0.13
-Django>=3.2.20,<4
+Django>=4.2.8,<5
 djangorestframework>=3.14.0
 drf-spectacular>=0.26.3
 email-reply-parser>=0.5.12

+ 1 - 1
requirements-dev-frozen.txt

@@ -39,7 +39,7 @@ cssutils==2.4.0
 datadog==0.44.0
 distlib==0.3.4
 distro==1.8.0
-django==3.2.23
+django==4.2.8
 django-crispy-forms==1.14.0
 django-csp==3.7
 django-pg-zero-downtime-migrations==0.13

+ 1 - 1
requirements-frozen.txt

@@ -32,7 +32,7 @@ cssselect==1.0.3
 cssutils==2.4.0
 datadog==0.44.0
 distro==1.8.0
-django==3.2.23
+django==4.2.8
 django-crispy-forms==1.14.0
 django-csp==3.7
 django-pg-zero-downtime-migrations==0.13

+ 1 - 1
src/sentry/api/paginator.py

@@ -30,7 +30,7 @@ def count_hits(queryset, max_hits):
     # clear out any select fields (include select_related) and pull just the id
     hits_query.clear_select_clause()
     hits_query.add_fields(["id"])
-    hits_query.clear_ordering(force_empty=True)
+    hits_query.clear_ordering(force=True, clear_default=True)
     try:
         h_sql, h_params = hits_query.sql_with_params()
     except EmptyResultSet:

+ 1 - 1
src/sentry/new_migrations/monkey/__init__.py

@@ -4,7 +4,7 @@ from django.db import models
 from sentry.new_migrations.monkey.executor import SentryMigrationExecutor
 from sentry.new_migrations.monkey.fields import deconstruct
 
-LAST_VERIFIED_DJANGO_VERSION = (3, 2)
+LAST_VERIFIED_DJANGO_VERSION = (4, 2)
 CHECK_MESSAGE = """Looks like you're trying to upgrade Django! Since we monkeypatch
 the Django migration library in several places, please verify that we have the latest
 code, and that the monkeypatching still works as expected. Currently the main things