New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for the upcoming Django 3.2 #329
Conversation
The CountryField uses super() in a few methods to skip CharField's methods and call methods of the CharField's superclass directly. Django 3.2 adds support for db_collation to CharField, but the CountryField doesn't need this. Since CountryField.\_\_init__ does not call CharField.\_\_init__, CountryField.deconstruct shouldn't call CharField.deconstruct either. Replaces SmileyChris#328
Codecov Report
@@ Coverage Diff @@
## master #329 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 27 27
Lines 1385 1385
=========================================
Hits 1385 1385
Continue to review full report at Codecov.
|
I have added Django 3.2a1 to the CI matrix. All tests fail without the |
Hmm, all tests do NOT pass, but the reason seems to be an incompatibility of Django and django-rest-framework. |
DRF expects django.db.models.fields.FieldDoesNotExist to exist but the exception has been moved.
Tests are passing now; I updated the description of this pull request to better reflect what it is all about. |
I found a good workaround for the time being. Add the following lines e.g. to your
|
Thanks Matthias, I'll get a version pushed out tomorrow |
is this already fixing the "db_collation" error for CountryField? |
@domdinicola Yes. |
@SmileyChris Could you release a new version please? |
Released as v7.1 |
The CountryField uses super() in a few methods to skip CharField's methods and call methods of the CharField's superclass directly. Django 3.2 adds support for db_collation to CharField, but the CountryField doesn't need this. Since CountryField.__init__ does not call CharField.__init__, CountryField.deconstruct shouldn't call CharField.deconstruct either.
Also, Django 3.1 and django-rest-framework 3.10.x are not compatible because django-rest-framework imports the
FieldDoesNotExist
exception from location where it isn't available anymore in Django 3.1. Therefore, this pull request also removes this combination from the CI matrix.Replaces #328