Closed
Description
Simplest case. Under Python 3.9:
>>> from rest_framework.serializers import Serializer
>>> Serializer().data | {}
Expected output:
{}
Actual behaviour:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/luke/devel/django-rest-framework/rest_framework/utils/serializer_helpers.py", line 17, in __init__
self.serializer = kwargs.pop('serializer')
KeyError: 'serializer'
I will provide a PR soon.
Checklist
- I did not raise a discussion, as this is obviously a bug
- This cannot be dealt with as a third party library. (We prefer new functionality to be in the form of third party libraries where possible.)
- I have reduced the issue to the simplest possible case.
Metadata
Metadata
Assignees
Labels
No labels