You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bson/__init__.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -58,10 +58,10 @@
58
58
the microsecond field is truncated.
59
59
.. [#dt2] all datetime.datetime instances are encoded as UTC. By default, they
60
60
are decoded as *naive* but timezone aware datetimes are also supported.
61
-
See :doc:`/examples/datetimes` for examples.
61
+
See `Dates and Times <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/dates-and-times/#dates-and-times>`_ for examples.
62
62
.. [#dt3] To enable decoding a bson UTC datetime to a :class:`~bson.datetime_ms.DatetimeMS`
63
-
instance see :ref:`handling-out-of-range-datetimes`.
64
-
.. [#uuid] For :py:class:`uuid.UUID` encoding and decoding behavior see :doc:`/examples/uuid`.
63
+
instance see `handling out of range datetimes <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/dates-and-times/#handling-out-of-range-datetimes>`_.
64
+
.. [#uuid] For :py:class:`uuid.UUID` encoding and decoding behavior see `<https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/uuid/#universally-unique-ids--uuids->`_.
65
65
.. [#re] :class:`~bson.regex.Regex` instances and regular expression
66
66
objects from ``re.compile()`` are both saved as BSON regular expressions.
67
67
BSON regular expressions are decoded as :class:`~bson.regex.Regex`
Copy file name to clipboardExpand all lines: bson/binary.py
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,7 @@ class UuidRepresentation:
79
79
:class:`~bson.binary.Binary` instance will be returned instead of a
80
80
:class:`uuid.UUID` instance.
81
81
82
-
See :ref:`unspecified-representation-details` for details.
82
+
See `unspecifiedrepresentationdetails <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/uuid/#unspecified>`_ for details.
83
83
84
84
.. versionadded:: 3.11
85
85
"""
@@ -91,7 +91,7 @@ class UuidRepresentation:
91
91
and decoded from BSON binary, using RFC-4122 byte order with
92
92
binary subtype :data:`UUID_SUBTYPE`.
93
93
94
-
See :ref:`standard-representation-details` for details.
94
+
See `standardrepresentationdetails <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/uuid/#standard>`_ for details.
95
95
96
96
.. versionadded:: 3.11
97
97
"""
@@ -103,7 +103,7 @@ class UuidRepresentation:
103
103
and decoded from BSON binary, using RFC-4122 byte order with
104
104
binary subtype :data:`OLD_UUID_SUBTYPE`.
105
105
106
-
See :ref:`python-legacy-representation-details` for details.
106
+
See `pythonlegacyrepresentationdetails <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/uuid/#python_legacy>`_ for details.
See :ref:`handling-uuid-data-example` for details.
331
+
See `UUID representations <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/uuid/#universally-unique-ids--uuids->`_ for details.
See :ref:`handling-uuid-data-example` for details.
380
+
See `UUID representations <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/uuid/#universally-unique-ids--uuids->`_ for details.
Copy file name to clipboardExpand all lines: bson/codec_options.py
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@ class TypeEncoder(abc.ABC):
57
57
Codec classes must implement the ``python_type`` attribute, and the
58
58
``transform_python`` method to support encoding.
59
59
60
-
See :ref:`custom-type-type-codec` documentation for an example.
60
+
See `encode data with type codecs <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/custom-types/type-codecs/#encode-data-with-type-codecs>`_ documentation for an example.
61
61
"""
62
62
63
63
@abc.abstractproperty
@@ -76,7 +76,7 @@ class TypeDecoder(abc.ABC):
76
76
Codec classes must implement the ``bson_type`` attribute, and the
77
77
``transform_bson`` method to support decoding.
78
78
79
-
See :ref:`custom-type-type-codec` documentation for an example.
79
+
See `encode data with type codecs <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/custom-types/type-codecs/#encode-data-with-type-codecs>`_ documentation for an example.
80
80
"""
81
81
82
82
@abc.abstractproperty
@@ -98,7 +98,7 @@ class TypeCodec(TypeEncoder, TypeDecoder):
98
98
``bson_type`` attribute, and the ``transform_bson`` method to support
99
99
decoding.
100
100
101
-
See :ref:`custom-type-type-codec` documentation for an example.
101
+
See `encode data with type codecs <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/custom-types/type-codecs/#encode-data-with-type-codecs>`_ documentation for an example.
See :ref:`custom-type-type-registry` documentation for an example.
121
+
See `add codec to the type registry <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/custom-types/type-codecs/#add-codec-to-the-type-registry>`_ documentation for an example.
122
122
123
123
:param type_codecs: iterable of type codec instances. If
124
124
``type_codecs`` contains multiple codecs that transform a single
@@ -128,7 +128,7 @@ class TypeRegistry:
128
128
type.
129
129
:param fallback_encoder: callable that accepts a single,
130
130
unencodable python value and transforms it into a type that
131
-
:mod:`bson` can encode. See :ref:`fallback-encoder-callable`
131
+
:mod:`bson` can encode. See `define a fallbackencoder <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/custom-types/type-codecs/#define-a-fallback-encoder>`_
See :doc:`/examples/datetimes` for examples using the `tz_aware` and
330
+
See `Dates and Times <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/dates-and-times/#dates-and-times>`_ for examples using the `tz_aware` and
331
331
`tzinfo` options.
332
332
333
-
See :doc:`/examples/uuid` for examples using the `uuid_representation`
333
+
See `UUID <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/uuid/#universally-unique-ids--uuids->`_ for examples using the `uuid_representation`
334
334
option.
335
335
336
336
:param document_class: BSON documents returned in queries will be decoded
:data:`~bson.binary.UuidRepresentation.UNSPECIFIED`. New
345
345
applications should consider setting this to
346
346
:data:`~bson.binary.UuidRepresentation.STANDARD` for cross language
347
-
compatibility. See :ref:`handling-uuid-data-example` for details.
347
+
compatibility. See `UUID representations <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/uuid/#universally-unique-ids--uuids->`_ for details.
348
348
:param unicode_decode_error_handler: The error handler to apply when
349
349
a Unicode-related error occurs during BSON decoding that would
350
350
otherwise raise :exc:`UnicodeDecodeError`. Valid options include
To decode UTC datetimes as a ``DatetimeMS``, `datetime_conversion` in
53
53
:class:`~bson.codec_options.CodecOptions` must be set to 'datetime_ms' or
54
-
'datetime_auto'. See :ref:`handling-out-of-range-datetimes` for
54
+
'datetime_auto'. See `handling out of range datetimes <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/dates-and-times/#handling-out-of-range-datetimes>`_ for
55
55
details.
56
56
57
57
:param value: An instance of :class:`datetime.datetime` to be
return DatetimeMS objects when the underlying datetime is
282
282
out-of-range and 'datetime_clamp' to clamp to the minimum and
283
283
maximum possible datetimes. Defaults to 'datetime'. See
284
-
:ref:`handling-out-of-range-datetimes` for details.
284
+
`handling out of range datetimes <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/dates-and-times/#handling-out-of-range-datetimes>`_ for details.
285
285
:param args: arguments to :class:`~bson.codec_options.CodecOptions`
286
286
:param kwargs: arguments to :class:`~bson.codec_options.CodecOptions`
0 commit comments