diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 42cc8dc1b7..2c2a5f4316 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -163,13 +163,10 @@ hatch run lint:build-manual ## Documentation -To contribute to the [API -documentation](https://pymongo.readthedocs.io/en/stable/) just make your -changes to the inline documentation of the appropriate [source -code](https://github.com/mongodb/mongo-python-driver) or [rst -file](https://github.com/mongodb/mongo-python-driver/tree/master/doc) in -a branch and submit a [pull -request](https://help.github.com/articles/using-pull-requests). You +To contribute to the [API documentation](https://pymongo.readthedocs.io/en/stable/) just make your +changes to the inline documentation of the appropriate [source code](https://github.com/mongodb/mongo-python-driver) or +[rst file](https://github.com/mongodb/mongo-python-driver/tree/master/doc) in +a branch and submit a [pull request](https://help.github.com/articles/using-pull-requests). You might also use the GitHub [Edit](https://github.com/blog/844-forking-with-the-edit-button) button. diff --git a/README.md b/README.md index bb773b795b..1076b66377 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![PyPI Version](https://img.shields.io/pypi/v/pymongo)](https://pypi.org/project/pymongo) [![Python Versions](https://img.shields.io/pypi/pyversions/pymongo)](https://pypi.org/project/pymongo) [![Monthly Downloads](https://static.pepy.tech/badge/pymongo/month)](https://pepy.tech/project/pymongo) -[![Documentation Status](https://readthedocs.org/projects/pymongo/badge/?version=stable)](http://pymongo.readthedocs.io/en/stable/?badge=stable) +[![API Documentation Status](https://readthedocs.org/projects/pymongo/badge/?version=stable)](http://pymongo.readthedocs.io/en/stable/api?badge=stable) ## About diff --git a/bson/_cbsonmodule.c b/bson/_cbsonmodule.c index 3e9d5ecc26..34b407b940 100644 --- a/bson/_cbsonmodule.c +++ b/bson/_cbsonmodule.c @@ -306,7 +306,7 @@ static PyObject* datetime_from_millis(long long millis) { if (evalue) { PyObject* err_msg = PyObject_Str(evalue); if (err_msg) { - 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"); + 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"); if (appendage) { PyObject* msg = PyUnicode_Concat(err_msg, appendage); if (msg) { diff --git a/bson/datetime_ms.py b/bson/datetime_ms.py index 1b6fa22794..679524cb60 100644 --- a/bson/datetime_ms.py +++ b/bson/datetime_ms.py @@ -31,7 +31,7 @@ _DATETIME_ERROR_SUGGESTION = ( "(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" + " See: https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/dates-and-times/#handling-out-of-range-datetimes" ) diff --git a/doc/index.rst b/doc/index.rst index 71e1423816..0ac8bdec6e 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -1,6 +1,11 @@ PyMongo |release| Documentation =============================== +.. note:: The PyMongo documentation has been migrated to the + `MongoDB Documentation site `_. + As of PyMongo 4.10, the ReadTheDocs site will contain the detailed changelog and API docs, while the + rest of the documentation will only appear on the MongoDB Documentation site. + Overview -------- **PyMongo** is a Python distribution containing tools for working with @@ -95,8 +100,6 @@ pull request. Changes ------- See the :doc:`changelog` for a full list of changes to PyMongo. -For older versions of the documentation please see the -`archive list `_. About This Documentation ------------------------ diff --git a/pymongo/asynchronous/topology.py b/pymongo/asynchronous/topology.py index 9dd1a1c76b..4e778cbc17 100644 --- a/pymongo/asynchronous/topology.py +++ b/pymongo/asynchronous/topology.py @@ -227,8 +227,9 @@ async def open(self) -> None: warnings.warn( # type: ignore[call-overload] # noqa: B028 "AsyncMongoClient opened before fork. May not be entirely fork-safe, " "proceed with caution. See PyMongo's documentation for details: " - "https://pymongo.readthedocs.io/en/stable/faq.html#" - "is-pymongo-fork-safe", + "https://www.mongodb.com/docs/languages/" + "python/pymongo-driver/current/faq/" + "#is-pymongo-fork-safe-", **kwargs, ) async with self._lock: diff --git a/pymongo/synchronous/topology.py b/pymongo/synchronous/topology.py index 414865154e..e8070e30ab 100644 --- a/pymongo/synchronous/topology.py +++ b/pymongo/synchronous/topology.py @@ -227,8 +227,9 @@ def open(self) -> None: warnings.warn( # type: ignore[call-overload] # noqa: B028 "MongoClient opened before fork. May not be entirely fork-safe, " "proceed with caution. See PyMongo's documentation for details: " - "https://pymongo.readthedocs.io/en/stable/faq.html#" - "is-pymongo-fork-safe", + "https://www.mongodb.com/docs/languages/" + "python/pymongo-driver/current/faq/" + "#is-pymongo-fork-safe-", **kwargs, ) with self._lock: diff --git a/pyproject.toml b/pyproject.toml index b64c7d6031..2df172fde2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ classifiers = [ [project.urls] Homepage = "https://www.mongodb.org" -Documentation = "https://pymongo.readthedocs.io" +Documentation = "https://www.mongodb.com/docs/languages/python/pymongo-driver/current/" Source = "https://github.com/mongodb/mongo-python-driver" Tracker = "https://jira.mongodb.org/projects/PYTHON/issues"