Changelog

0.17.0 (2019-06-22)

Features:

  • Add support for postgresql.MONEY type (#218). Thanks @heckad for the PR.

0.16.4 (2019-06-15)

Bug fixes:

  • Compatibility with marshmallow 3.0.0rc7. Thanks @heckad for the catch and patch.

0.16.3 (2019-05-05)

Bug fixes:

  • Compatibility with marshmallow 3.0.0rc6.

0.16.2 (2019-04-10)

Bug fixes:

  • Prevent ValueError when using the exclude class Meta option with TableSchema (#202).

0.16.1 (2019-03-11)

Bug fixes:

  • Fix compatibility with SQLAlchemy 1.3 (#185).

0.16.0 (2019-02-03)

Features:

  • Add support for deserializing transient objects (#62). Thanks @jacksmith15 for the PR.

0.15.0 (2018-11-05)

Features:

  • Add ModelConverter._should_exclude_field hook (#139). Thanks @jeanphix for the PR.

  • Allow field kwargs to be overriden by passing info['marshmallow'] to column properties (#21). Thanks @dpwrussell for the suggestion and PR. Thanks @jeanphix for the final implementation.

0.14.2 (2018-11-03)

Bug fixes:

  • Fix behavior of Related field (#150). Thanks @zezic for reporting and thanks @AbdealiJK for the PR.

  • Related now works with AssociationProxy fields (#151). Thanks @AbdealiJK for the catch and patch.

Other changes:

  • Test against Python 3.7.

  • Bring development environment in line with marshmallow.

0.14.1 (2018-07-19)

Bug fixes:

  • Fix behavior of exclude with marshmallow 3.0 (#131). Thanks @yaheath for reporting and thanks @deckar01 for the fix.

0.14.0 (2018-05-28)

Features:

  • Make ModelSchema.session a property, which allows session to be retrieved from context (#129). Thanks @gtxm.

Other changes:

  • Drop official support for Python 3.4. Python>=3.5 and Python 2.7 are supported.

0.13.2 (2017-10-23)

Bug fixes:

  • Unset instance attribute when an error occurs during a load call (#114). Thanks @vgavro for the catch and patch.

0.13.1 (2017-04-06)

Bug fixes:

  • Prevent unnecessary queries when using the fields.Related (#106). Thanks @xarg for reporting and thanks @jmuhlich for the PR.

0.13.0 (2017-03-12)

Features:

  • Invalid inputs for compound primary keys raise a ValidationError when deserializing a scalar value (#103). Thanks @YuriHeupa for the PR.

Bug fixes:

  • Fix compatibility with marshmallow>=3.x.

0.12.1 (2017-01-05)

Bug fixes:

  • Reset ModelSchema.instance after each load call, allowing schema instances to be reused (#78). Thanks @georgexsh for reporting.

Other changes:

  • Test against Python 3.6.

0.12.0 (2016-10-08)

Features:

  • Add support for TypeDecorator-based types (#83). Thanks @frol.

Bug fixes:

  • Fix bug that caused a validation errors for custom column types that have the python_type of uuid.UUID (#54). Thanks @wkevina and thanks @kelvinhammond for the fix.

Other changes:

  • Drop official support for Python 3.3. Python>=3.4 and Python 2.7 are supported.

0.11.0 (2016-10-01)

Features:

  • Allow overriding field class returned by field_for by adding the field_class param (#81). Thanks @cancan101.

0.10.0 (2016-08-14)

Features:

  • Support for SQLAlchemy JSON type (in SQLAlchemy>=1.1) (#74). Thanks @ewittle for the PR.

0.9.0 (2016-07-02)

Features:

  • Enable deserialization of many-to-one nested objects that do not exist in the database (#69). Thanks @seanharr11 for the PR.

Bug fixes:

  • Depend on SQLAlchemy>=0.9.7, since marshmallow-sqlalchemy uses sqlalchemy.dialects.postgresql.JSONB (#65). Thanks @alejom99 for reporting.

0.8.1 (2016-02-21)

Bug fixes:

  • ModelSchema and TableSchema respect field order if the ordered=True class Meta option is set (#52). Thanks @jeffwidman for reporting and @jmcarp for the patch.

  • Declared fields are not introspected in order to support, e.g. column_property (#57). Thanks @jmcarp.

0.8.0 (2015-12-28)

Features:

  • ModelSchema and TableSchema will respect the TYPE_MAPPING class variable of Schema subclasses when converting Columns to Fields (#42). Thanks @dwieeb for the suggestion.

0.7.1 (2015-12-13)

Bug fixes:

  • Don’t make marshmallow fields required for non-nullable columns if a column has a default value or autoincrements (#47). Thanks @jmcarp for the fix. Thanks @AdrielVelazquez for reporting.

0.7.0 (2015-12-07)

Features:

  • Add include_fk class Meta option (#36). Thanks @jmcarp.

  • Non-nullable columns will generated required marshmallow Fields (#40). Thanks @jmcarp.

  • Improve support for MySQL BIT field (#41). Thanks @rudaporto.

  • Backwards-incompatible: Remove fields.get_primary_columns in favor of fields.get_primary_keys.

  • Backwards-incompatible: Remove Related.related_columns in favor of fields.related_keys.

Bug fixes:

  • Fix serializing relationships when using non-default column names (#44). Thanks @jmcarp for the fix. Thanks @repole for the bug report.

0.6.0 (2015-09-29)

Features:

  • Support for compound primary keys. Thanks @jmcarp.

Other changes:

  • Supports marshmallow>=2.0.0.

0.5.0 (2015-09-27)

  • Add instance argument to ModelSchema constructor and ModelSchema.load which allows for updating existing DB rows (#26). Thanks @sssilver for reporting and @jmcarp for the patch.

  • Don’t autogenerate fields that are in Meta.exclude (#27). Thanks @jmcarp.

  • Raise ModelConversionError if converting properties whose column don’t define a python_type. Thanks @jmcarp.

  • Backwards-incompatible: ModelSchema.make_object is removed in favor of decorated make_instance method for compatibility with marshmallow>=2.0.0rc2.

0.4.1 (2015-09-13)

Bug fixes:

  • Now compatible with marshmallow>=2.0.0rc1.

  • Correctly pass keyword arguments from field_for to generated List fields (#25). Thanks @sssilver for reporting.

0.4.0 (2015-09-03)

Features:

  • Add TableSchema for generating Schemas from tables (#4). Thanks @jmcarp.

Bug fixes:

  • Allow session to be passed to ModelSchema.validate, since it requires it. Thanks @dpwrussell.

  • When serializing, don’t skip overriden fields that are part of a polymorphic hierarchy (#18). Thanks again @dpwrussell.

Support:

  • Docs: Add new recipe for automatic generation of schemas. Thanks @dpwrussell.

0.3.0 (2015-08-27)

Features:

  • Backwards-incompatible: Relationships are (de)serialized by a new, more efficient Related column (#7). Thanks @jmcarp.

  • Improve support for MySQL types (#1). Thanks @rmackinnon.

  • Improve support for Postgres ARRAY types (#6). Thanks @jmcarp.

  • ModelSchema no longer requires the sqla_session class Meta option. A Session can be passed to the constructor or to the ModelSchema.load method (#11). Thanks @dtheodor for the suggestion.

Bug fixes:

  • Null foreign keys are serialized correctly as None (#8). Thanks @mitchej123.

  • Properly handle a relationship specifies uselist=False (##17). Thanks @dpwrussell.

0.2.0 (2015-05-03)

Features:

  • Add field_for function for generating marshmallow Fields from SQLAlchemy mapped class properties.

Support:

  • Docs: Add “Overriding generated fields” section to “Recipes”.

0.1.1 (2015-05-02)

Bug fixes:

  • Fix keygetter class Meta option.

0.1.0 (2015-04-28)

  • First release.