colander v1.0.b1 Release Notes

Release Date: 2013-09-01 // over 10 years ago
  • ๐Ÿ› Bug Fixes

    • ๐Ÿ”€ In 1.0a1, there was a change merged from https://github.com/Pylons/colander/pull/73 which made it possible to supply None as the default value for a String type, and upon serialization, the value would be rendered as colander.null if the default were used. This confused people who were actually supplying the value None as a default when the associated appstruct had no value, so the change has been reverted. When you supply None as the default argument to a String, the rendered serialize() value will again be 'None'. Sorry.

    • Normalize colander.Function argument message to be msg. This now matches other APIs within Colander. The message argument is now deprecated and a warning will be emitted. https://github.com/Pylons/colander/issues/31 https://github.com/Pylons/colander/issues/64

    • iso8601.py: Convert ValueError (raised by datetime) into ParseErrorr in parse_date, so that the validation machinery upstream handles it properly.

    • ๐Ÿ“œ iso8601.py: Correctly parse datetimes with a timezone of Z even when the default_timezone is set. These previously had the default timezone.

    • colander.String schema type now raises colander.Invalid when trying to deserialize a non-string item. See https://github.com/Pylons/colander/issues/100

    ๐Ÿ”‹ Features

    • โž• Add colander.List type, modeled on deform.List: this type preserves ordering, and allows duplicates.

    • 0๏ธโƒฃ It is now possible to use the value colander.drop as the default value for items that are subitems of a mapping. If colander.drop is used as the default for a subnode of a mapping schema, and the mapping appstruct being serialized does not have a value for that schema node, the value will be omitted from the serialized mapping. For instance, the following script, when run would not raise an assertion error::

      class What(colander.MappingSchema): thing = colander.SchemaNode(colander.String(), default=colander.drop)

      result = What().serialize({}) # no "thing" in mapping assert result == {}

    • The typ of a SchemaNode can optionally be pased in as a keyword argument. See https://github.com/Pylons/colander/issues/90

    • ๐Ÿ‘ Allow interpolation of missing_msg with properties title and name