Skip to content
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

Fix compatibility with django-rest-framework 3.14.0 having depreciated NullBooleanField #814

Merged
merged 2 commits into from
Sep 26, 2022

Conversation

JoelLefkowitz
Copy link
Collaborator

As pointed out in #810, django-rest-framework 3.14.0 has depreciated its NullBooleanField.

For the sake of backwards compatibility we can drop the NullBooleanField types when the installed version of django-rest-framework exceeds 3.14.0.

@JoelLefkowitz JoelLefkowitz changed the base branch from master to 1.21.x September 24, 2022 21:32
@JoelLefkowitz
Copy link
Collaborator Author

Before merging I would like someone to have a look at this PR for a soundness check. Once merged I'll deploy a new release to pypi.

@yamac-kurtulus
Copy link

Just a heads up, models.NullBooleanField is still there, serializer field is deprecated. Though it is completely understandable if you want to remove that too.

@JorisBenschop
Copy link

JorisBenschop commented Sep 26, 2022

indeed, at this moment when a user installs the latest drf and drf-yasg, there is a crash in "serializer_field_to_basic_type" (field.py).
I should note that the error the user gets is really cryptic. Because the original error is caught, it is replaced by a "module does not define a %s attribute/class", which is not the error at all, and puts people on a wild goose chase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants