Skip to content

Commit ad16d6e

Browse files
authored
PYTHON-4431 - Remove ReadTheDocs Documentation in Favor of Official Docs (#2459)
1 parent bbb6f88 commit ad16d6e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+147
-7314
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ implementation on top of `pymongo`.
1616

1717
PyMongo supports MongoDB 4.0, 4.2, 4.4, 5.0, 6.0, 7.0, and 8.0. PyMongo follows [semantic versioning](https://semver.org/spec/v2.0.0.html) for its releases.
1818

19+
## Documentation
20+
21+
Documentation is available at
22+
[mongodb.com](https://www.mongodb.com/docs/languages/python/pymongo-driver/current/).
23+
24+
[API documentation](https://pymongo.readthedocs.io/en/stable/api/) and the [full changelog](https://pymongo.readthedocs.io/en/stable/changelog.html) for each release is available at [readthedocs.io](https://pymongo.readthedocs.io/en/stable/index.html).
25+
1926
## Support / Feedback
2027

2128
For issues with, questions about, or feedback for PyMongo, please look
@@ -191,13 +198,6 @@ ObjectId('4aba160ee23f6b543e000002')
191198
[8, 11]
192199
```
193200

194-
## Documentation
195-
196-
Documentation is available at
197-
[pymongo.readthedocs.io](https://pymongo.readthedocs.io/en/stable/).
198-
199-
See the [contributing guide](./CONTRIBUTING.md#documentation) for how to build the documentation.
200-
201201
## Learning Resources
202202

203203
- MongoDB Learn - [Python

bson/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@
5858
the microsecond field is truncated.
5959
.. [#dt2] all datetime.datetime instances are encoded as UTC. By default, they
6060
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.
6262
.. [#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->`_.
6565
.. [#re] :class:`~bson.regex.Regex` instances and regular expression
6666
objects from ``re.compile()`` are both saved as BSON regular expressions.
6767
BSON regular expressions are decoded as :class:`~bson.regex.Regex`

bson/binary.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class UuidRepresentation:
7979
:class:`~bson.binary.Binary` instance will be returned instead of a
8080
:class:`uuid.UUID` instance.
8181
82-
See :ref:`unspecified-representation-details` for details.
82+
See `unspecified representation details <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/uuid/#unspecified>`_ for details.
8383
8484
.. versionadded:: 3.11
8585
"""
@@ -91,7 +91,7 @@ class UuidRepresentation:
9191
and decoded from BSON binary, using RFC-4122 byte order with
9292
binary subtype :data:`UUID_SUBTYPE`.
9393
94-
See :ref:`standard-representation-details` for details.
94+
See `standard representation details <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/uuid/#standard>`_ for details.
9595
9696
.. versionadded:: 3.11
9797
"""
@@ -103,7 +103,7 @@ class UuidRepresentation:
103103
and decoded from BSON binary, using RFC-4122 byte order with
104104
binary subtype :data:`OLD_UUID_SUBTYPE`.
105105
106-
See :ref:`python-legacy-representation-details` for details.
106+
See `python legacy representation details <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/uuid/#python_legacy>`_ for details.
107107
108108
.. versionadded:: 3.11
109109
"""
@@ -115,7 +115,7 @@ class UuidRepresentation:
115115
and decoded from BSON binary subtype :data:`OLD_UUID_SUBTYPE`,
116116
using the Java driver's legacy byte order.
117117
118-
See :ref:`java-legacy-representation-details` for details.
118+
See `Java Legacy UUID <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/uuid/#java_legacy>`_ for details.
119119
120120
.. versionadded:: 3.11
121121
"""
@@ -127,7 +127,7 @@ class UuidRepresentation:
127127
and decoded from BSON binary subtype :data:`OLD_UUID_SUBTYPE`,
128128
using the C# driver's legacy byte order.
129129
130-
See :ref:`csharp-legacy-representation-details` for details.
130+
See `C# Legacy UUID <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/uuid/#csharp_legacy>`_ for details.
131131
132132
.. versionadded:: 3.11
133133
"""
@@ -328,7 +328,7 @@ def from_uuid(
328328
:param uuid_representation: A member of
329329
:class:`~bson.binary.UuidRepresentation`. Default:
330330
:const:`~bson.binary.UuidRepresentation.STANDARD`.
331-
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.
332332
333333
.. versionadded:: 3.11
334334
"""
@@ -377,7 +377,7 @@ def as_uuid(self, uuid_representation: int = UuidRepresentation.STANDARD) -> UUI
377377
:param uuid_representation: A member of
378378
:class:`~bson.binary.UuidRepresentation`. Default:
379379
:const:`~bson.binary.UuidRepresentation.STANDARD`.
380-
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.
381381
382382
.. versionadded:: 3.11
383383
"""

bson/codec_options.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class TypeEncoder(abc.ABC):
5757
Codec classes must implement the ``python_type`` attribute, and the
5858
``transform_python`` method to support encoding.
5959
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.
6161
"""
6262

6363
@abc.abstractproperty
@@ -76,7 +76,7 @@ class TypeDecoder(abc.ABC):
7676
Codec classes must implement the ``bson_type`` attribute, and the
7777
``transform_bson`` method to support decoding.
7878
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.
8080
"""
8181

8282
@abc.abstractproperty
@@ -98,7 +98,7 @@ class TypeCodec(TypeEncoder, TypeDecoder):
9898
``bson_type`` attribute, and the ``transform_bson`` method to support
9999
decoding.
100100
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.
102102
"""
103103

104104

@@ -118,7 +118,7 @@ class TypeRegistry:
118118
>>> type_registry = TypeRegistry([Codec1, Codec2, Codec3, ...],
119119
... fallback_encoder)
120120
121-
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.
122122
123123
:param type_codecs: iterable of type codec instances. If
124124
``type_codecs`` contains multiple codecs that transform a single
@@ -128,7 +128,7 @@ class TypeRegistry:
128128
type.
129129
:param fallback_encoder: callable that accepts a single,
130130
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 fallback encoder <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/custom-types/type-codecs/#define-a-fallback-encoder>`_
132132
documentation for an example.
133133
"""
134134

@@ -327,10 +327,10 @@ def __init__(self, *args, **kwargs):
327327
>>> doc._id
328328
ObjectId('5b3016359110ea14e8c58b93')
329329
330-
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
331331
`tzinfo` options.
332332
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`
334334
option.
335335
336336
:param document_class: BSON documents returned in queries will be decoded
@@ -344,7 +344,7 @@ def __init__(self, *args, **kwargs):
344344
:data:`~bson.binary.UuidRepresentation.UNSPECIFIED`. New
345345
applications should consider setting this to
346346
: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.
348348
:param unicode_decode_error_handler: The error handler to apply when
349349
a Unicode-related error occurs during BSON decoding that would
350350
otherwise raise :exc:`UnicodeDecodeError`. Valid options include

bson/datetime_ms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __init__(self, value: Union[int, datetime.datetime]):
5151
5252
To decode UTC datetimes as a ``DatetimeMS``, `datetime_conversion` in
5353
: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
5555
details.
5656
5757
:param value: An instance of :class:`datetime.datetime` to be

bson/json_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def __init__(self, *args: Any, **kwargs: Any):
281281
return DatetimeMS objects when the underlying datetime is
282282
out-of-range and 'datetime_clamp' to clamp to the minimum and
283283
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.
285285
:param args: arguments to :class:`~bson.codec_options.CodecOptions`
286286
:param kwargs: arguments to :class:`~bson.codec_options.CodecOptions`
287287

0 commit comments

Comments
 (0)