Browse Source

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

This reverts commit 4a058135bd01c1545fc1ea975f552cb220d805dc.

Co-authored-by: asottile-sentry <103459774+asottile-sentry@users.noreply.github.com>
getsentry-bot 1 year ago
parent
commit
271a7a8b75

+ 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>=4.2.8,<5
+Django>=3.2.20,<4
 djangorestframework>=3.14.0
 drf-spectacular>=0.26.3
 email-reply-parser>=0.5.12

+ 1 - 1
requirements-dev-frozen.txt

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

+ 1 - 1
requirements-frozen.txt

@@ -33,7 +33,7 @@ cssselect==1.0.3
 cssutils==2.4.0
 datadog==0.44.0
 distro==1.8.0
-django==4.2.8
+django==3.2.23
 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=True, clear_default=True)
+    hits_query.clear_ordering(force_empty=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 = (4, 2)
+LAST_VERIFIED_DJANGO_VERSION = (3, 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