Fix basic Django 3.2 incompatibilities

This commit is contained in:
Quantum 2022-04-14 22:11:37 -04:00 committed by Tudor Brindus
parent b676a490db
commit fed36cc12e
3 changed files with 13 additions and 10 deletions

View File

@ -1,4 +1,4 @@
import pymysql
pymysql.install_as_MySQLdb()
pymysql.version_info = (1, 3, 13, 'final', 0)
pymysql.version_info = (1, 4, 0, 'final', 0)

View File

@ -55,7 +55,10 @@ def join_sql_subquery(queryset, subquery, params, join_fields, alias, join_type=
parent_alias = parent_model._meta.db_table
else:
parent_alias = queryset.query.get_initial_alias()
queryset.query.external_aliases.add(alias)
if isinstance(queryset.query.external_aliases, dict): # Django 3.x
queryset.query.external_aliases[alias] = True
else:
queryset.query.external_aliases.add(alias)
join = RawSQLJoin(subquery, params, parent_alias, alias, join_type, FakeJoinField(join_fields), join_type == LOUTER)
queryset.query.join(join)
join.table_alias = alias

View File

@ -1,11 +1,11 @@
Django>=2.2,<3
django_compressor
django-mptt
Django>=3.2,<4
django_compressor>=3
django-mptt>=0.13
django-pagedown<2
django-registration-redux
django-reversion
django-registration-redux>=2.10
django-reversion>=3.0.5,<4
django-social-share
django-sortedm2m @ git+https://github.com/DMOJ/django-sortedm2m.git
django-sortedm2m>=3.1.0
django-impersonate
dmoj-wpadmin @ git+https://github.com/DMOJ/dmoj-wpadmin.git
lxml
@ -18,13 +18,13 @@ pika
ua-parser
pyyaml
jinja2
django_jinja
django_jinja>=2.5.0
llist
requests
django-fernet-fields
pyotp
qrcode[pil]
jsonfield
jsonfield>=3.0.3
pymoss
packaging
celery