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
ModelSerializeris 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_relatedon aunion()of two QuerySets is not allowed; however, we can apply theprefetch_relatedto both querysets in the union without any loss in query optimisation. This changesEntityElements.get_queryset - Starting with Django 3.1,
Meta.orderingno longer affects queries that have aGROUP BY. This causes theCorpusMLClassListendpoint to loose its implicit class name ordering, which has been explicitly restored in its queryset. - An optimization in
DELETEqueries having Q objects combined withORcauses one less query in the ML results deletion consumer. - Cookie SameSite settings now have two separate options
'None'(string) andFalse(boolean) -
django-cors-headersneeded 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
Pointconstructor. Support forPoint(iterable)is added alongsidePoint(int, int). - One failing test due to common!63; fixed in !867 (merged)
Edited by Erwan Rouchet