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
androunding
args tocolander.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 aninsert_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. IfSchemaNode.cstruct_children
is called on a node with a type that does not have acstruct_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 raiseKeyError
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.