Skip to content

Version 3.0 #1800

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

Merged
merged 203 commits into from
Nov 3, 2014
Merged

Version 3.0 #1800

merged 203 commits into from
Nov 3, 2014

Conversation

tomchristie
Copy link
Member

The 3.0 release notes are available here.

Discussion group thread on 3.0 changes... https://groups.google.com/forum/#!topic/django-rest-framework/24rSIFWEJoI

To do:

  • Basic serializers as forms
  • unique, unique_together.
  • .validate() method on fields.
  • FileField and ImageField.
  • ListField vs ListSerializer.
  • BaseSerializer to accept many, partial, context.
  • request.data and request.query_params.
  • Automatic field binding.
  • many=True on relational fields.
  • Comprehensive tests for serializer fields & serializers.
  • Integration tests for serializer relationships
  • Support extra_kwargs.
  • NotImplementedError by default on field to/from methods.
  • Consider to_representation() and to_internal_value() renaming.
  • MethodField back to SerializerMethodField, support optional method argument.
  • Ensure NON_FIELD_ERRORS get a consistent key name in responses.
  • BooleanField to validate more strictly. (See Fix boolean validation when string is passed as value #1866.)
  • through fields as read-only.
  • Nice manager representations on serializer repr.
  • Drop label keyword argument when its default would be correct.
  • lookup_class to raise KeyError, and ModelField.field_mapping to include models.Field: ModelField mapping.
  • Compact JSON representation.
  • Unicode JSON representation with control character escaping.
  • Remove custom throttle header.
  • Use Django's GCBV latest .all() behavior instead of._clone()`, here.
  • Document DecimalField - required args, and coerce_to_string behaviour.
  • Consider default settings for datetime repr - coerce to string at serializer level by default?
  • Drop usage of validators.EMPTY_VALUES
  • Correct class on nested ModelSerializer vs HyperlinkedModelSerializer

Second pass:

  • Serializers as forms cleanup.
  • List serializers as forms.
  • Model field validators should be preserved.
  • Validators on relational fields.
  • Style of validation errors inside ListField, ManyRelation, ListSerializer.
  • test_lists.py from core serializers.
  • tests for dotted source notation.
  • Blank date returns incorrect validation error.
  • Form buttons in browsable API.
  • ListSerializer and keyword arguments design decision, see... https://groups.google.com/d/msg/django-rest-framework/24rSIFWEJoI/ziZ8zzEOAa4J
  • Nested serializers as forms.
  • unique_for_date.
  • source=<field_name> and method_name=get_<field_name> -> PendingDeprecation, not assert.
  • Call any simple callables when getting attribute value... https://groups.google.com/forum/#!topic/django-rest-framework/24rSIFWEJoI
  • Reintroduce save hooks.
  • PendingDeprecation instead of outright changes.
  • Consider transform_<field>().
  • validate returning value or not?
  • Integration tests for serializer reverse relationships.
  • tests for Generic FKs.
  • Consider error lists vs single error.
  • min_value, max_value on integer fields. (See also django-12030, and associated PR.)
  • None-list passed to ManyRelation or ListSerializer.
  • empty / initial on fields and empty serializer data.
  • Deal with datetime being passed to TimeField or DateField.
  • Don't include validator kwargs on read only fields.
  • NullBooleanField.
  • OPTIONS and the metadata() API.
  • partial support.
  • allow_none, allow_blank & required vs default behaviours.

Documentation:

  • Update the tutorial.
  • The metadata API.
  • Validators.
  • Update DateTimeField/DateField/TimeField now that format default has changed.
  • PUT as create, including missing link to docs for PUT-as-create, here when they exist.
  • NullBooleanField
  • ListField/ListSerializer
  • Document min_value/max_value on integer type fields, as per django/django@1506c71
  • Remove widget and document style.

Nice to haves:

  • Better docs on custom exception handling in release notes.
  • dotted and starred source on relational fields (get_attribute and get_iterable)
  • Nested choices.
  • Validators defined on Meta
  • Errors on serializer forms.
  • Errors as sorted dicts.
  • files support on serializer forms for compat with Django GCBV and Vanilla.
  • ValidationFailed to use errors, not detail?
  • Performance on hyperlinked fields.
  • Performance on PK fields.
  • Support ReadOnlyField automatically based on fields attribute.
  • Error when source == field_name.
  • Error when SerializerMethodField argument is == get_{field_name}
  • Nice error messages when fields includes something that is not a field, reverse relationship or simple model method.

Later:

  • More explicit error when SerializerMethodField raises AttributeError
  • Improve attribute error when field not found on instance during serialisation.
  • Improve errors when default .create() or .update() methods are not sufficient.
  • Improve error when nested field is missing many=True.
  • Cache model info for ModelSerializer / HyperlinkedModelSerializer.
  • initial as 0/0.0/'0' for JSON integer fields, but blank string in form.
  • Push related ObjectDoesNotExist into related field logic and out of field? (Or not?)
  • Choices in HTML defaulting correctly.
  • NavBar in browsable API a bit too high.
  • Description in browsable API doesn't leave a bottom margin, unless Markdown rendered.
  • unique_for_date and source argument.
  • unique_for_date on relationships.

Closes #1263.
Closes #1358.
Closes #1368.
Closes #1521.
Closes #1773.
Closes #1774.
Closes #1775.
Closes #1799.
Closes #1801.
Closes #1802.
Closes #1823.
Closes #1848.
Closes #1889.

@tomchristie tomchristie added this to the 3.0 Release milestone Aug 29, 2014
@tomchristie tomchristie self-assigned this Aug 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment