Skip to content

Commit a5e7d3f

Browse files
committed
Remove duplicate module ids and fix links
1 parent ba24e5a commit a5e7d3f

File tree

3 files changed

+9
-16
lines changed

3 files changed

+9
-16
lines changed

docs/api_reference.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ Schema
1010
======
1111

1212

13-
.. autoclass:: Schema
13+
.. autoclass:: marshmallow.Schema
1414
:inherited-members:
1515

16-
.. autoclass:: SchemaOpts
16+
.. autoclass:: marshmallow.SchemaOpts
1717

18-
.. autoclass:: MarshalResult
19-
.. autoclass:: UnmarshalResult
18+
.. autoclass:: marshmallow.MarshalResult
19+
.. autoclass:: marshmallow.UnmarshalResult
2020

21-
.. autofunction:: pprint
21+
.. autofunction:: marshmallow.pprint
2222

2323
.. _api_fields:
2424

docs/upgrading.rst

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ In 2.0, validation/deserialization of `None` is consistent across field types. I
3737
Default Values
3838
**************
3939

40-
Before version 2.0, certain fields (including `fields.String`, `fields.List`, `fields.Nested` and number fields) had implicit default values that would be used if their corresponding input value was `None` or missing.
40+
Before version 2.0, certain fields (including `String <marshmallow.fields.String>`, `List <marshmallow.fields.List>`, `Nested <marshmallow.fields.Nested>`, and number fields) had implicit default values that would be used if their corresponding input value was `None` or missing.
4141

4242

4343
In 2.0, these implicit defaults are removed. A `Field's <marshmallow.fields.Field>` ``default`` parameter is only used if you explicitly set it. Otherwise, missing inputs will be excluded from the serialized output.
@@ -259,8 +259,6 @@ For a full list of changes in 2.0, see the :ref:`Changelog <changelog>`.
259259
Upgrading to 1.2
260260
++++++++++++++++
261261

262-
.. module:: marshmallow.fields
263-
264262
Validators
265263
**********
266264

@@ -306,8 +304,6 @@ The `Decimal` field was added to support serialization/deserialization of `decim
306304
Upgrading to 1.0
307305
++++++++++++++++
308306

309-
.. module:: marshmallow
310-
311307
Version 1.0 marks the first major release of marshmallow. Many big changes were made from the pre-1.0 releases in order to provide a cleaner API, support object deserialization, and improve field validation.
312308

313309
Perhaps the largest change is in how objects get serialized. Serialization occurs by invoking the :meth:`Schema.dump` method rather than passing the object to the constructor. Because only configuration options (e.g. the ``many``, ``strict``, and ``only`` parameters) are passed to the constructor, you can more easily reuse serializer instances. The :meth:`dump <Schema.dump>` method also forms a nice symmetry with the :meth:`Schema.load` method, which is used for deserialization.
@@ -339,8 +335,6 @@ Perhaps the largest change is in how objects get serialized. Serialization occur
339335

340336
Some crucial parts of the pre-1.0 API have been retained to ease the transition. You can still pass an object to a `Schema` constructor and access the `Schema.data` and `Schema.errors` properties. The `is_valid` method, however, has been completely removed. It is recommended that you migrate to the new API to prevent future releases from breaking your code.
341337

342-
.. module:: marshmallow.fields
343-
344338
The Fields interface was also reworked in 1.0 to make it easier to define custom fields with their own serialization and deserialization behavior. Custom fields now implement :meth:`Field._serialize` and :meth:`Field._deserialize`.
345339

346340
.. code-block:: python

docs/why.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.. _why:
2-
.. module:: marshmallow
32

43
Why marshmallow?
54
================
@@ -18,7 +17,7 @@ Marshmallow makes no assumption about web frameworks or database layers. It will
1817
Concise, familiar syntax.
1918
-------------------------
2019

21-
If you have used `Django REST Framework`_ or `WTForms <http://wtforms.simplecodes.com/docs/1.0.3/>`_, marshmallow's :class:`Schema` syntax will feel familiar to you. Class-level field attributes define the schema for formatting your data. Configuration is added using the :ref:`class Meta <meta_options>` paradigm. Configuration options can be overriden at application runtime by passing arguments to the :class:`Schema` constructor. The :meth:`dump <Schema.dump>` and :meth:`load <Schema.load>` methods are used for serialization and deserialization (of course!).
20+
If you have used `Django REST Framework`_ or `WTForms <http://wtforms.simplecodes.com/docs/1.0.3/>`_, marshmallow's :class:`Schema` syntax will feel familiar to you. Class-level field attributes define the schema for formatting your data. Configuration is added using the :ref:`class Meta <meta_options>` paradigm. Configuration options can be overriden at application runtime by passing arguments to the `Schema <marshmallow.Schema>` constructor. The :meth:`dump <marshmallow.Schema.dump>` and :meth:`load <marshmallow.Schema.load>` methods are used for serialization and deserialization (of course!).
2221

2322
Class-based schemas allow for code reuse and configuration.
2423
-----------------------------------------------------------
@@ -30,7 +29,7 @@ Consistency meets flexibility.
3029

3130
Marshmallow makes it easy to modify a schema's output at application runtime. A single :class:`Schema` can produce multiple outputs formats while keeping the individual field outputs consistent.
3231

33-
As an example, you might have a JSON endpoint for retrieving all information about a video game's state. You then add a low-latency endpoint that only returns a minimal subset of information about game state. Both endpoints can be handled by the same :class:`Schema`.
32+
As an example, you might have a JSON endpoint for retrieving all information about a video game's state. You then add a low-latency endpoint that only returns a minimal subset of information about game state. Both endpoints can be handled by the same `Schema <marshmallow.Schema>`.
3433

3534
.. code-block:: python
3635
@@ -62,7 +61,7 @@ Context-aware serialization.
6261

6362
Marshmallow schemas can modify their output based on the context in which they are used. Field objects have access to a ``context`` dictionary that can be changed at runtime.
6463

65-
Here's a simple example that shows how a :class:`Schema` can anonymize a person's name when a boolean is set on the context.
64+
Here's a simple example that shows how a `Schema <marshmallow.Schema>` can anonymize a person's name when a boolean is set on the context.
6665

6766
.. code-block:: python
6867

0 commit comments

Comments
 (0)