-
-
Couldn't load subscription status.
- Fork 131
[Breaking change] Remove work-around for ModelSerializer.instance field for many=True
#719
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not find any Sequence usages in https://github.com/encode/django-rest-framework/blob/master/rest_framework/serializers.py
Thanks!
just fixed the type ignore error in ci |
|
There was a plan to fix this with an overloaded Serializer |
|
got it. thanks for clarifying! will close. |
|
Sorry for the lack of reply. It's a tricky decision between two bad options and I've been pondering this in the background. I'm rather inclined to merge this. |
|
actually a simpler patch here is to delete the line that's edited (since BaseSerializer already sets |
remove instance type declaration in ModelSerializer
ModelSerializer.instance field for many=True
|
Sorry for sitting on this PR for so long. But since this can potentially regress users, I wanted to be sure that the background and justification is properly documented, but kept procrastinating on that. In any case it's out now, djangorestframework-stubs Release notes: https://github.com/typeddjango/djangorestframework-stubs/releases/tag/3.16.3 |
fixes #718
Edit by @intgr
The background of this change is described in #827. If this change caused a regression in your use case, please comment there ➔ #827