citusdata / django-multitenant

Python/Django support for distributed multi-tenant databases like Postgres+Citus
MIT License
730 stars 118 forks source link

Support Django 4.0 and drop 1.11 support #114

Closed JelteF closed 2 years ago

JelteF commented 2 years ago

Modify the code to work with Django 4.0. The main change in 4.0 that broke some things was that where_class was not available anymore. This could be replaced using WhereNode in all supported Django versions.

Some fixes to the test code for Django 4.0 broke those same tests on Django 1.11. To solve this we could have added version checks to make this test code work on Django 1.11. Instead it was decided to drop Django 1.11 support and with that also Python 2.7 support. So this change also removes all Django 1.11 compatibility code.

Python 2.7 its EOL is 2020-01-01 and Django 1.11 its EOL is 2020-04-01. Given both these EOLs are more than 1.5 years ago at this point, it seems fine to drop their support for future versions of this library.