Commit efb798ce by Tom Christie

Don't deprecate 'exclude'

Need to track outcome of Django's #19733, and decide on approach
accordingly.
parent 280dfa43
......@@ -165,11 +165,6 @@ class BaseSerializer(Field):
# Remove anything in 'exclude'
if self.opts.exclude:
# Note: To be deprecated in line with Django's ModelForm change.
# https://code.djangoproject.com/ticket/19733
warnings.warn('`exclude` option on serializers is due to be deprecated. '
'Use the `fields` option instead.',
PendingDeprecationWarning, stacklevel=2)
for key in self.opts.exclude:
ret.pop(key, None)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment