colander v0.9.9 Release Notes

Release Date: 2012-09-24 // over 11 years ago
  • ๐Ÿ”‹ Features

    • ๐Ÿ‘ Allow the use of missing=None for Number. See https://github.com/Pylons/colander/pull/59 .

    • Create a colander.Money type that is a Decimal type with two-decimal-point precision rounded-up.

    • ๐Ÿ‘ Allow quant and rounding args to colander.Decimal constructor.

    • luhnok validator added (credit card luhn mod10 validator).

    • โž• Add an insert method to SchemaNode objects.

    • โž• Add an insert_before method to SchemaNode objects.

    • ๐Ÿ‘ Better class-based mapping schema inheritance model.

      • A node declared in a subclass of a mapping schema superclass now overrides any node with the same name inherited from any superclass. Previously, it just repeated and didn't override.
      • An insert_before keyword argument may be passed to a SchemaNode constructor. This is a string naming a node in a superclass. A node with an insert_before will be placed before the named node in a parent mapping schema.
    • The preparer= argument to SchemaNodes may now be a sequence of preparers.

    • โž• Added a cstruct_children method to SchemaNode.

    • A new cstruct_children API should exist on schema types. If SchemaNode.cstruct_children is called on a node with a type that does not have a cstruct_children method, a deprecation warning is emitted and [] is returned (this may or may not be the correct value for your custom type).

    Backwards Incompatibilities

    • The inheritance changes required a minor backwards incompatibility: calling __setitem__ on a SchemaNode will no longer raise KeyError when attempting to set a subnode into a node that doesn't already have an existing subnode by that name. Instead, the subnode will be appended to the child list.

    ๐Ÿ“š Documentation

    • A "Schema Inheritance" section was added to the Basics chapter documentation.