Skip to content

Commit 3b21517

Browse files
Jibolablink1073
andauthored
PYTHON-4752 Migrate docs links to Internal Docs Where Possible (mongodb#1715)
Co-authored-by: Steven Silvester <[email protected]>
1 parent 0c0633d commit 3b21517

File tree

8 files changed

+19
-17
lines changed

8 files changed

+19
-17
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,10 @@ hatch run lint:build-manual
163163

164164
## Documentation
165165

166-
To contribute to the [API
167-
documentation](https://pymongo.readthedocs.io/en/stable/) just make your
168-
changes to the inline documentation of the appropriate [source
169-
code](https://github.com/mongodb/mongo-python-driver) or [rst
170-
file](https://github.com/mongodb/mongo-python-driver/tree/master/doc) in
171-
a branch and submit a [pull
172-
request](https://help.github.com/articles/using-pull-requests). You
166+
To contribute to the [API documentation](https://pymongo.readthedocs.io/en/stable/) just make your
167+
changes to the inline documentation of the appropriate [source code](https://github.com/mongodb/mongo-python-driver) or
168+
[rst file](https://github.com/mongodb/mongo-python-driver/tree/master/doc) in
169+
a branch and submit a [pull request](https://help.github.com/articles/using-pull-requests). You
173170
might also use the GitHub
174171
[Edit](https://github.com/blog/844-forking-with-the-edit-button) button.
175172

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![PyPI Version](https://img.shields.io/pypi/v/pymongo)](https://pypi.org/project/pymongo)
44
[![Python Versions](https://img.shields.io/pypi/pyversions/pymongo)](https://pypi.org/project/pymongo)
55
[![Monthly Downloads](https://static.pepy.tech/badge/pymongo/month)](https://pepy.tech/project/pymongo)
6-
[![Documentation Status](https://readthedocs.org/projects/pymongo/badge/?version=stable)](http://pymongo.readthedocs.io/en/stable/?badge=stable)
6+
[![API Documentation Status](https://readthedocs.org/projects/pymongo/badge/?version=stable)](http://pymongo.readthedocs.io/en/stable/api?badge=stable)
77

88
## About
99

bson/_cbsonmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ static PyObject* datetime_from_millis(long long millis) {
306306
if (evalue) {
307307
PyObject* err_msg = PyObject_Str(evalue);
308308
if (err_msg) {
309-
PyObject* appendage = PyUnicode_FromString(" (Consider Using CodecOptions(datetime_conversion=DATETIME_AUTO) or MongoClient(datetime_conversion='DATETIME_AUTO')). See: https://pymongo.readthedocs.io/en/stable/examples/datetimes.html#handling-out-of-range-datetimes");
309+
PyObject* appendage = PyUnicode_FromString(" (Consider Using CodecOptions(datetime_conversion=DATETIME_AUTO) or MongoClient(datetime_conversion='DATETIME_AUTO')). See: https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/dates-and-times/#handling-out-of-range-datetimes");
310310
if (appendage) {
311311
PyObject* msg = PyUnicode_Concat(err_msg, appendage);
312312
if (msg) {

bson/datetime_ms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
_DATETIME_ERROR_SUGGESTION = (
3232
"(Consider Using CodecOptions(datetime_conversion=DATETIME_AUTO)"
3333
" or MongoClient(datetime_conversion='DATETIME_AUTO'))."
34-
" See: https://pymongo.readthedocs.io/en/stable/examples/datetimes.html#handling-out-of-range-datetimes"
34+
" See: https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/dates-and-times/#handling-out-of-range-datetimes"
3535
)
3636

3737

doc/index.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
PyMongo |release| Documentation
22
===============================
33

4+
.. note:: The PyMongo documentation has been migrated to the
5+
`MongoDB Documentation site <https://www.mongodb.com/docs/languages/python/pymongo-driver/current>`_.
6+
As of PyMongo 4.10, the ReadTheDocs site will contain the detailed changelog and API docs, while the
7+
rest of the documentation will only appear on the MongoDB Documentation site.
8+
49
Overview
510
--------
611
**PyMongo** is a Python distribution containing tools for working with
@@ -95,8 +100,6 @@ pull request.
95100
Changes
96101
-------
97102
See the :doc:`changelog` for a full list of changes to PyMongo.
98-
For older versions of the documentation please see the
99-
`archive list <http://api.mongodb.org/python/>`_.
100103

101104
About This Documentation
102105
------------------------

pymongo/asynchronous/topology.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,9 @@ async def open(self) -> None:
227227
warnings.warn( # type: ignore[call-overload] # noqa: B028
228228
"AsyncMongoClient opened before fork. May not be entirely fork-safe, "
229229
"proceed with caution. See PyMongo's documentation for details: "
230-
"https://pymongo.readthedocs.io/en/stable/faq.html#"
231-
"is-pymongo-fork-safe",
230+
"https://www.mongodb.com/docs/languages/"
231+
"python/pymongo-driver/current/faq/"
232+
"#is-pymongo-fork-safe-",
232233
**kwargs,
233234
)
234235
async with self._lock:

pymongo/synchronous/topology.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,9 @@ def open(self) -> None:
227227
warnings.warn( # type: ignore[call-overload] # noqa: B028
228228
"MongoClient opened before fork. May not be entirely fork-safe, "
229229
"proceed with caution. See PyMongo's documentation for details: "
230-
"https://pymongo.readthedocs.io/en/stable/faq.html#"
231-
"is-pymongo-fork-safe",
230+
"https://www.mongodb.com/docs/languages/"
231+
"python/pymongo-driver/current/faq/"
232+
"#is-pymongo-fork-safe-",
232233
**kwargs,
233234
)
234235
with self._lock:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ classifiers = [
4242

4343
[project.urls]
4444
Homepage = "https://www.mongodb.org"
45-
Documentation = "https://pymongo.readthedocs.io"
45+
Documentation = "https://www.mongodb.com/docs/languages/python/pymongo-driver/current/"
4646
Source = "https://github.com/mongodb/mongo-python-driver"
4747
Tracker = "https://jira.mongodb.org/projects/PYTHON/issues"
4848

0 commit comments

Comments
 (0)