fix for newer sphinx (fixes #38)

This commit is contained in:
Chris McDonough
2012-02-17 23:35:51 -05:00
parent d045230910
commit cd9c4e107b
3 changed files with 28 additions and 21 deletions

View File

@@ -139,15 +139,17 @@ attached to the node unmolested (e.g. when ``foo=1`` is passed, the
resulting schema node will have an attribute named ``foo`` with the resulting schema node will have an attribute named ``foo`` with the
value ``1``). value ``1``).
.. note:: You may see some higher-level systems (such as Deform) pass a .. note::
``widget`` argument to a SchemaNode constructor. Such systems make use of
the fact that a SchemaNode can be passed arbitrary keyword arguments for You may see some higher-level systems (such as Deform) pass a ``widget``
extension purposes. ``widget`` and other keyword arguments not enumerated argument to a SchemaNode constructor. Such systems make use of the fact
here but which are passed during schema node construction by someone that a SchemaNode can be passed arbitrary keyword arguments for extension
constructing a schema for a particular purpose are not used internally by purposes. ``widget`` and other keyword arguments not enumerated here but
Colander; they are instead only meaningful to higher-level systems which which are passed during schema node construction by someone constructing a
consume Colander schemas. Abitrary keyword arguments are allowed to a schema for a particular purpose are not used internally by Colander; they
schema node constructor in Colander 0.9+. Prior version disallow them. are instead only meaningful to higher-level systems which consume Colander
schemas. Abitrary keyword arguments are allowed to a schema node
constructor in Colander 0.9+. Prior version disallow them.
The name of a schema node that is introduced as a class-level The name of a schema node that is introduced as a class-level
attribute of a :class:`colander.MappingSchema`, attribute of a :class:`colander.MappingSchema`,
@@ -389,9 +391,11 @@ attribute with the value ``None``. Each exception instance will also
have an attribute named ``node``, representing the schema node to have an attribute named ``node``, representing the schema node to
which the exception is related. which the exception is related.
.. note:: Translation strings are objects which behave like Unicode objects .. note::
but have extra metadata associated with them for use in translation
systems. See `http://docs.repoze.org/projects/translationstring/dev/ Translation strings are objects which behave like Unicode objects but have
extra metadata associated with them for use in translation systems. See
`http://docs.repoze.org/projects/translationstring/dev/
<http://docs.pylonsproject.org/projects/translationstring/dev/>`_ for <http://docs.pylonsproject.org/projects/translationstring/dev/>`_ for
documentation about translation strings. All error messages used by documentation about translation strings. All error messages used by
Colander internally are translation strings, which means they can be Colander internally are translation strings, which means they can be

View File

@@ -1,7 +1,9 @@
Schema Binding Schema Binding
============== ==============
.. note:: Schema binding is new in colander 0.8. .. note::
Schema binding is new in colander 0.8.
Sometimes, when you define a schema at module-scope using a ``class`` Sometimes, when you define a schema at module-scope using a ``class``
statement, you simply don't have enough information to provide statement, you simply don't have enough information to provide

View File

@@ -308,12 +308,13 @@ value colander.null value used
value_a value_b value_a used value_a value_b value_a used
===================== ===================== =========================== ===================== ===================== ===========================
.. note:: ``<missing>`` in the above table represents the circumstance .. note::
in which a key present in a :class:`colander.MappingSchema` is not
present in a mapping passed to its ``<missing>`` in the above table represents the circumstance in which a
:meth:`colander.SchemaNode.deserialize` method. In reality, key present in a :class:`colander.MappingSchema` is not present in a
``<missing>`` means exactly the same thing as mapping passed to its :meth:`colander.SchemaNode.deserialize` method. In
:attr:`colander.null`, because the :class:`colander.Mapping` reality, ``<missing>`` means exactly the same thing as
type does the equivalent of ``mapping.get(keyname, :attr:`colander.null`, because the :class:`colander.Mapping` type does the
colander.null)`` to find a subvalue during deserialization. equivalent of ``mapping.get(keyname, colander.null)`` to find a subvalue
during deserialization.