Bump to Django 3.1
Part of architecture#14. When merging, please create a base-django-3.1
tag!
- Django REST Framework does support Django 3.1 via 3.11.1, a quick release that fixed some broken imports. However, the
ModelSerializer
is unable to translate the new JSONField into a JSON serializer field by itself. This adds one line to the WorkerVersion serializer. https://github.com/encode/django-rest-framework/pull/7467 - Starting with Django 3.0, applying
prefetch_related
on aunion()
of two QuerySets is not allowed; however, we can apply theprefetch_related
to both querysets in the union without any loss in query optimisation. This changesEntityElements.get_queryset
- Starting with Django 3.1,
Meta.ordering
no longer affects queries that have aGROUP BY
. This causes theCorpusMLClassList
endpoint to loose its implicit class name ordering, which has been explicitly restored in its queryset. - An optimization in
DELETE
queries having Q objects combined withOR
causes one less query in the ML results deletion consumer. - Cookie SameSite settings now have two separate options
'None'
(string) andFalse
(boolean) -
django-cors-headers
needed to be upgraded to support Django 3, and this caused a breaking change to be pulled on the origin whitelist, causing protocol schemes to be required (architecture!116) - Django 3 added some complexity to the way it handles iterables as query filters, causing errors on the
Point
constructor. Support forPoint(iterable)
is added alongsidePoint(int, int)
. - One failing test due to common!63; fixed in !867 (merged)
Edited by Erwan Rouchet