Skip to content

Commit

Permalink
PYTHON-4752 Migrate docs links to Internal Docs Where Possible (#1715)
Browse files Browse the repository at this point in the history
Co-authored-by: Steven Silvester <steve.silvester@mongodb.com>
  • Loading branch information
Jibola and blink1073 authored Sep 17, 2024
1 parent 0c0633d commit 3b21517
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 17 deletions.
11 changes: 4 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion bson/_cbsonmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion bson/datetime_ms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)


Expand Down
7 changes: 5 additions & 2 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
PyMongo |release| Documentation
===============================

.. note:: The PyMongo documentation has been migrated to the
`MongoDB Documentation site <https://www.mongodb.com/docs/languages/python/pymongo-driver/current>`_.
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
Expand Down Expand Up @@ -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 <http://api.mongodb.org/python/>`_.

About This Documentation
------------------------
Expand Down
5 changes: 3 additions & 2 deletions pymongo/asynchronous/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 3 additions & 2 deletions pymongo/synchronous/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 3b21517

Please sign in to comment.