Skip to content

Commit 7b3504a

Browse files
committed
README-context-extension.rst: documentation updated.
1 parent bbaf4c2 commit 7b3504a

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

README-context-extension.rst

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,13 @@
2929
.. \||<-snap->|| skip
3030
.. \||<-snap->|| include ^index-header.snip$
3131
32-
Provides application specific C extension activation/deactivation and
33-
a full vertical BSON context for encoding objects.
32+
Provides application specific C extension (de-)activation and a full
33+
vertical BSON context for encoding objects.
3434

3535
.. warning:: This is an expert module, which does not protect against
36-
uninformed mistakes. If you wish to be protected, use the
37-
official driver. If you do not want to take
38-
responsibility for your actions, do not use this
39-
extension.
36+
uninformed mistakes. Although it won't corrupt your database, you
37+
should still consider carefully whether you need any of the
38+
features.
4039

4140
==================================================
4241
:rem:`|||:sec:|||`\ Rationale
@@ -45,18 +44,20 @@ a full vertical BSON context for encoding objects.
4544
Currently, the C extensions for PyMongo/BSON can only be
4645
enabled/disabled with site-wide installation options.
4746

48-
If the C extensions should be disabled (for e.g. mod_wsgi) virtual_env
47+
If the C extensions must be disabled (for e.g. mod_wsgi) virtual_env
4948
has to be used, if the standard installation should not be modified.
5049

5150
SON manipulators can be used to automate object conversion, when
5251
writing into a MongoDB database. However, SON manipulators only work
53-
in the database layer of PyMongo.
52+
in the database layer of PyMongo and require copying the entire
53+
document tree, if the original has to be preserved.
5454

5555
When the :mod:`bson` module is used as a standalone serialization
56-
protocol, you are out of luck.
56+
protocol, you are out of luck. Since there is currently no provision
57+
in the BSON encoder to allow graceful recovery on a per-element basis.
5758

58-
There is currently no provision in the BSON encoder to allow graceful
59-
recovery on a per-element basis.
59+
Writing both a SON manipulator and a document expander is redundant,
60+
since they basically perform the same task.
6061

6162
==================================================
6263
:rem:`|||:sec:|||`\ Caveat
@@ -66,7 +67,7 @@ This extension works on the BSON encoding/decoding level.
6667

6768
It is perfectly possible to postpone object conversion to that stage.
6869
This will, however, make SON manipulators for outgoing transformations
69-
effectively defunct below the top level.
70+
on unexpanded objects effectively defunct.
7071

7172
Currently there is only one SON manipulator active, namely
7273
:class:`pymongo.son_manipulator.ObjectIdInjector`, which provides an

README.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ Context Extension
33
=================
44

55
.. warning:: This is an unofficial fork of the original PyMongo
6-
driver. Read README-context-extension before using
7-
it.
6+
driver. See README-context-extension.rst before using it.
87

98
=======
109
PyMongo

0 commit comments

Comments
 (0)