MOTOR-922 Update docs.mongodb.com links in source, API & Reference documentation (#154)
This commit is contained in:
parent
e2d5fa50ad
commit
588951e51e
5
.github/workflows/test-python.yml
vendored
5
.github/workflows/test-python.yml
vendored
@ -43,3 +43,8 @@ jobs:
|
||||
- name: Run tests
|
||||
run: |
|
||||
tox
|
||||
- name: Run docs
|
||||
run: |
|
||||
tox -e py3-sphinx-docs
|
||||
tox -e py3-sphinx-doctest
|
||||
tox -e py3-sphinx-linkcheck
|
||||
|
||||
@ -82,7 +82,7 @@ Security Vulnerabilities
|
||||
|
||||
If you've identified a security vulnerability in a driver or any other
|
||||
MongoDB project, please report it according to the `instructions here
|
||||
<http://docs.mongodb.org/manual/tutorial/create-a-vulnerability-report>`_.
|
||||
<https://mongodb.com/docs/manual/tutorial/create-a-vulnerability-report>`_.
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
@ -120,6 +120,6 @@
|
||||
|
||||
await db.test.inline_map_reduce(map, reduce, limit=2)
|
||||
|
||||
.. _map reduce command: http://docs.mongodb.org/manual/reference/command/mapReduce/
|
||||
.. _map reduce command: https://mongodb.com/docs/manual/reference/command/mapReduce/
|
||||
|
||||
.. mongodoc:: mapreduce
|
||||
|
||||
@ -124,6 +124,6 @@
|
||||
|
||||
Returns a Future.
|
||||
|
||||
.. _map reduce command: http://docs.mongodb.org/manual/reference/command/mapReduce/
|
||||
.. _map reduce command: https://mongodb.com/docs/manual/reference/command/mapReduce/
|
||||
|
||||
.. mongodoc:: mapreduce
|
||||
|
||||
@ -189,7 +189,7 @@ Deprecations:
|
||||
Applications should use ``async for`` to iterate over cursors instead.
|
||||
- Deprecated the :meth:`~motor.motor_asyncio.AsyncIOMotorClient.fsync`
|
||||
method. Applications should run the
|
||||
`fsync command <https://docs.mongodb.com/manual/reference/command/fsync/>`_
|
||||
`fsync command <https://mongodb.com/docs/manual/reference/command/fsync/>`_
|
||||
directly with :meth:`~motor.motor_asyncio.AsyncIOMotorDatabase.command`
|
||||
instead.
|
||||
|
||||
@ -289,10 +289,10 @@ deleted. Manage user accounts with four database commands: createUser_,
|
||||
usersInfo_, updateUser_, and dropUser_. You can run any database command with
|
||||
the :meth:`MotorDatabase.command` method.
|
||||
|
||||
.. _createUser: https://docs.mongodb.com/manual/reference/command/createUser/
|
||||
.. _usersInfo: https://docs.mongodb.com/manual/reference/command/usersInfo/
|
||||
.. _updateUser: https://docs.mongodb.com/manual/reference/command/updateUser/
|
||||
.. _dropUser: https://docs.mongodb.com/manual/reference/command/createUser/
|
||||
.. _createUser: https://mongodb.com/docs/manual/reference/command/createUser/
|
||||
.. _usersInfo: https://mongodb.com/docs/manual/reference/command/usersInfo/
|
||||
.. _updateUser: https://mongodb.com/docs/manual/reference/command/updateUser/
|
||||
.. _dropUser: https://mongodb.com/docs/manual/reference/command/createUser/
|
||||
|
||||
The deprecated GridFS classes ``MotorGridFS`` and ``AsyncIOMotorGridFS`` are
|
||||
deleted in favor of :class:`~motor.motor_tornado.MotorGridFSBucket` and
|
||||
@ -475,7 +475,7 @@ Motor 1.0
|
||||
Motor now depends on PyMongo 3.3 and later. The move from PyMongo 2 to 3 brings
|
||||
a large number of API changes, read the `the PyMongo 3 changelog`_ carefully.
|
||||
|
||||
.. _the PyMongo 3 changelog: http://api.mongodb.com/python/current/changelog.html#changes-in-version-3-0
|
||||
.. _the PyMongo 3 changelog: https://pymongo.readthedocs.io/en/stable/changelog.html#changes-in-version-3-0
|
||||
|
||||
:class:`MotorReplicaSetClient` is removed
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -975,7 +975,7 @@ Then instead, write::
|
||||
|
||||
The negative limit ensures the server closes the cursor after one result,
|
||||
saving Motor the work of closing it. See `cursor.limit
|
||||
<http://docs.mongodb.org/v3.0/reference/method/cursor.limit/>`_.
|
||||
<https://mongodb.com/docs/v3.0/reference/method/cursor.limit/>`_.
|
||||
|
||||
SSL hostname validation error
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -1012,7 +1012,7 @@ therefore inheriting
|
||||
and
|
||||
`PyMongo 2.8's bug fixes <https://jira.mongodb.org/browse/PYTHON/fixforversion/14223>`_
|
||||
and `features
|
||||
<http://api.mongodb.org/python/current/changelog.html#changes-in-version-2-8>`_.
|
||||
<https://pymongo.readthedocs.io/en/stable/changelog.html#changes-in-version-2-8>`_.
|
||||
|
||||
Fixes `a connection-pool timeout when waitQueueMultipleMS is set
|
||||
<https://jira.mongodb.org/browse/MOTOR-62>`_ and `two bugs in replica set
|
||||
@ -1023,12 +1023,10 @@ used it, see `MOTOR-56 <https://jira.mongodb.org/browse/MOTOR-56>`_.
|
||||
You can still use the :meth:`MotorDatabase.command` method directly.
|
||||
The only scenario not supported is copying a database from one host to
|
||||
another, if the remote host requires authentication.
|
||||
For this, use PyMongo's `copy_database`_ method, or, since PyMongo's
|
||||
For this, use PyMongo's ``copy_database`` method, or, since PyMongo's
|
||||
``copy_database`` will be removed in a future release too, use the mongo shell.
|
||||
|
||||
.. _copy_database: http://api.mongodb.org/python/current/api/pymongo/mongo_client.html#pymongo.mongo_client.MongoClient.copy_database
|
||||
|
||||
.. seealso:: `The "copydb" command <http://docs.mongodb.org/manual/reference/command/copydb/>`_.
|
||||
.. seealso:: `The "copydb" command <https://mongodb.com/docs/manual/reference/command/copydb/>`_.
|
||||
|
||||
Motor 0.3.3
|
||||
-----------
|
||||
@ -1301,7 +1299,7 @@ returns a Future instead of accepting a callback.
|
||||
.. _Greenlet: http://pypi.python.org/pypi/greenlet/
|
||||
.. _asynchronous resolver interface: http://www.tornadoweb.org/en/stable/netutil.html#tornado.netutil.Resolver
|
||||
.. _pycares: https://pypi.python.org/pypi/pycares
|
||||
.. _fsyncLock: http://docs.mongodb.org/manual/reference/method/db.fsyncLock/
|
||||
.. _fsyncLock: https://mongodb.com/docs/manual/reference/method/db.fsyncLock/
|
||||
|
||||
New Features
|
||||
~~~~~~~~~~~~
|
||||
@ -1320,7 +1318,7 @@ PyMongo 2.6 and 2.7:
|
||||
with :meth:`~MotorCursor.max_time_ms`.
|
||||
* A new :meth:`MotorGridFS.find` method for querying GridFS.
|
||||
|
||||
.. _authentication examples: http://api.mongodb.org/python/current/examples/authentication.html
|
||||
.. _authentication examples: https://pymongo.readthedocs.io/en/stable/examples/authentication.html
|
||||
|
||||
Bugfixes
|
||||
~~~~~~~~
|
||||
|
||||
@ -76,6 +76,8 @@ pygments_style = "sphinx"
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
# modindex_common_prefix = []
|
||||
|
||||
linkcheck_ignore = [r"http://localhost:\d+"]
|
||||
|
||||
# -- Options for extensions ----------------------------------------------------
|
||||
autoclass_content = "init"
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ You should see "TLS 1.X" where X is >= 1.
|
||||
|
||||
You can read more about TLS versions and their security implications here:
|
||||
|
||||
`<https://www.owasp.org/index.php/Transport_Layer_Protection_Cheat_Sheet#Rule_-_Only_Support_Strong_Protocols>`_
|
||||
`<https://cheatsheetseries.owasp.org/cheatsheets/Transport_Layer_Protection_Cheat_Sheet.html#only-support-strong-protocols>`_
|
||||
|
||||
.. _python.org: https://www.python.org/downloads/
|
||||
.. _homebrew: https://brew.sh/
|
||||
|
||||
@ -11,7 +11,7 @@ replica sets or sharded clusters, ``--keyFile``. Create an admin user and
|
||||
optionally normal users or read-only users.
|
||||
|
||||
.. seealso:: `MongoDB Authentication
|
||||
<http://docs.mongodb.org/manual/tutorial/control-access-to-mongodb-with-authentication/>`_
|
||||
<https://mongodb.com/docs/manual/tutorial/control-access-to-mongodb-with-authentication/>`_
|
||||
|
||||
To create an authenticated connection use a `MongoDB connection URI`_::
|
||||
|
||||
@ -20,4 +20,4 @@ To create an authenticated connection use a `MongoDB connection URI`_::
|
||||
|
||||
Motor logs in to the server on demand, when you first attempt an operation.
|
||||
|
||||
.. _MongoDB connection URI: http://docs.mongodb.org/manual/reference/connection-string/
|
||||
.. _MongoDB connection URI: https://mongodb.com/docs/manual/reference/connection-string/
|
||||
|
||||
@ -14,7 +14,7 @@ Building the docs requires `sphinx`_.
|
||||
|
||||
.. _PyMongo: https://pypi.python.org/pypi/pymongo/
|
||||
|
||||
.. _sphinx: http://sphinx.pocoo.org/
|
||||
.. _sphinx: https://www.sphinx-doc.org/
|
||||
|
||||
.. _compatibility-matrix:
|
||||
|
||||
@ -83,7 +83,7 @@ Use `the PyMongo compatibility matrix`_ to determine what MongoDB version is
|
||||
supported by PyMongo. Use the compatibility matrix above to determine what
|
||||
MongoDB version Motor supports.
|
||||
|
||||
.. _the PyMongo compatibility matrix: https://docs.mongodb.com/drivers/pymongo#mongodb-compatibility
|
||||
.. _the PyMongo compatibility matrix: https://mongodb.com/docs/drivers/pymongo#mongodb-compatibility
|
||||
|
||||
Motor and Tornado
|
||||
`````````````````
|
||||
|
||||
@ -42,7 +42,7 @@ Using Python 3.5 or later, do::
|
||||
|
||||
This tutorial assumes that a MongoDB instance is running on the
|
||||
default host and port. Assuming you have `downloaded and installed
|
||||
<http://docs.mongodb.org/manual/installation/>`_ MongoDB, you
|
||||
<https://mongodb.com/docs/manual/installation/>`_ MongoDB, you
|
||||
can start it like so:
|
||||
|
||||
.. code-block:: bash
|
||||
@ -51,7 +51,7 @@ can start it like so:
|
||||
|
||||
.. _pip: http://www.pip-installer.org/en/latest/installing.html
|
||||
|
||||
.. _MongoDB Tutorial: http://docs.mongodb.org/manual/tutorial/getting-started/
|
||||
.. _MongoDB Tutorial: https://mongodb.com/docs/manual/tutorial/getting-started/
|
||||
|
||||
Object Hierarchy
|
||||
----------------
|
||||
@ -97,12 +97,12 @@ Connect to a replica set like:
|
||||
|
||||
>>> client = motor.motor_asyncio.AsyncIOMotorClient('mongodb://host1,host2/?replicaSet=my-replicaset-name')
|
||||
|
||||
.. _connection URIs: http://docs.mongodb.org/manual/reference/connection-string/
|
||||
.. _connection URIs: https://mongodb.com/docs/manual/reference/connection-string/
|
||||
|
||||
Getting a Database
|
||||
------------------
|
||||
A single instance of MongoDB can support multiple independent
|
||||
`databases <http://docs.mongodb.org/manual/reference/glossary/#term-database>`_.
|
||||
`databases <https://www.mongodb.com/docs/manual/core/databases-and-collections/>`_.
|
||||
From an open client, you can get a reference to a particular database with
|
||||
dot-notation or bracket-notation:
|
||||
|
||||
@ -116,7 +116,7 @@ Creating a reference to a database does no I/O and does not require an
|
||||
|
||||
Getting a Collection
|
||||
--------------------
|
||||
A `collection <http://docs.mongodb.org/manual/reference/glossary/#term-collection>`_
|
||||
A `collection <https://www.mongodb.com/docs/manual/core/databases-and-collections/>`_
|
||||
is a group of documents stored in MongoDB, and can be thought of as roughly
|
||||
the equivalent of a table in a relational database. Getting a
|
||||
collection in Motor works the same as getting a database:
|
||||
@ -258,7 +258,7 @@ You can apply a sort, limit, or skip to a query before you begin iterating:
|
||||
The cursor does not actually retrieve each document from the server
|
||||
individually; it gets documents efficiently in `large batches`_.
|
||||
|
||||
.. _`large batches`: https://docs.mongodb.com/manual/tutorial/iterate-a-cursor/#cursor-batches
|
||||
.. _`large batches`: https://mongodb.com/docs/manual/tutorial/iterate-a-cursor/#cursor-batches
|
||||
|
||||
Counting Documents
|
||||
------------------
|
||||
@ -456,4 +456,4 @@ reference to Motor's complete feature set.
|
||||
Learning to use the MongoDB driver is just the beginning, of course. For
|
||||
in-depth instruction in MongoDB itself, see `The MongoDB Manual`_.
|
||||
|
||||
.. _The MongoDB Manual: http://docs.mongodb.org/manual/
|
||||
.. _The MongoDB Manual: https://mongodb.com/docs/manual/
|
||||
|
||||
@ -55,7 +55,7 @@ exception:
|
||||
|
||||
This tutorial also assumes that a MongoDB instance is running on the
|
||||
default host and port. Assuming you have `downloaded and installed
|
||||
<http://docs.mongodb.org/manual/installation/>`_ MongoDB, you
|
||||
<https://mongodb.com/docs/manual/installation/>`_ MongoDB, you
|
||||
can start it like so:
|
||||
|
||||
.. code-block:: bash
|
||||
@ -64,7 +64,7 @@ can start it like so:
|
||||
|
||||
.. _pip: http://www.pip-installer.org/en/latest/installing.html
|
||||
|
||||
.. _MongoDB Tutorial: http://docs.mongodb.org/manual/tutorial/getting-started/
|
||||
.. _MongoDB Tutorial: https://mongodb.com/docs/manual/tutorial/getting-started/
|
||||
|
||||
Object Hierarchy
|
||||
----------------
|
||||
@ -108,12 +108,12 @@ Connect to a replica set like:
|
||||
|
||||
>>> client = motor.motor_tornado.MotorClient('mongodb://host1,host2/?replicaSet=my-replicaset-name')
|
||||
|
||||
.. _connection URIs: http://docs.mongodb.org/manual/reference/connection-string/
|
||||
.. _connection URIs: https://mongodb.com/docs/manual/reference/connection-string/
|
||||
|
||||
Getting a Database
|
||||
------------------
|
||||
A single instance of MongoDB can support multiple independent
|
||||
`databases <http://docs.mongodb.org/manual/reference/glossary/#term-database>`_.
|
||||
`databases <https://www.mongodb.com/docs/manual/core/databases-and-collections/>`_.
|
||||
From an open client, you can get a reference to a particular database with
|
||||
dot-notation or bracket-notation:
|
||||
|
||||
@ -179,7 +179,7 @@ methods than ``HTTPServer.start()``. See Tornado's guide to
|
||||
|
||||
Getting a Collection
|
||||
--------------------
|
||||
A `collection <http://docs.mongodb.org/manual/reference/glossary/#term-collection>`_
|
||||
A `collection <https://www.mongodb.com/docs/manual/core/databases-and-collections/>`_
|
||||
is a group of documents stored in MongoDB, and can be thought of as roughly
|
||||
the equivalent of a table in a relational database. Getting a
|
||||
collection in Motor works the same as getting a database:
|
||||
@ -350,7 +350,7 @@ You can apply a sort, limit, or skip to a query before you begin iterating:
|
||||
The cursor does not actually retrieve each document from the server
|
||||
individually; it gets documents efficiently in `large batches`_.
|
||||
|
||||
.. _`large batches`: https://docs.mongodb.com/manual/tutorial/iterate-a-cursor/#cursor-batches
|
||||
.. _`large batches`: https://mongodb.com/docs/manual/tutorial/iterate-a-cursor/#cursor-batches
|
||||
|
||||
Counting Documents
|
||||
------------------
|
||||
@ -483,4 +483,4 @@ reference to Motor's complete feature set.
|
||||
Learning to use the MongoDB driver is just the beginning, of course. For
|
||||
in-depth instruction in MongoDB itself, see `The MongoDB Manual`_.
|
||||
|
||||
.. _The MongoDB Manual: http://docs.mongodb.org/manual/
|
||||
.. _The MongoDB Manual: https://mongodb.com/docs/manual/
|
||||
|
||||
@ -152,7 +152,7 @@ class AIOHTTPGridFS:
|
||||
- `get_cache_time`: Optional override for :func:`get_cache_time`
|
||||
- `set_extra_headers`: Optional override for :func:`set_extra_headers`
|
||||
|
||||
.. _GridFS: https://docs.mongodb.com/manual/core/gridfs/
|
||||
.. _GridFS: https://www.mongodb.com/docs/manual/core/gridfs/
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
|
||||
@ -580,7 +580,7 @@ class AgnosticDatabase(AgnosticBaseProperties):
|
||||
.. versionadded:: 2.1
|
||||
|
||||
.. _aggregate command:
|
||||
https://docs.mongodb.com/manual/reference/command/aggregate
|
||||
https://www.mongodb.com/docs/manual/reference/command/aggregate/
|
||||
"""
|
||||
cursor_class = create_class_with_framework(
|
||||
AgnosticLatentCommandCursor, self._framework, self.__module__
|
||||
@ -948,7 +948,7 @@ class AgnosticCollection(AgnosticBaseProperties):
|
||||
Added cursor support.
|
||||
|
||||
.. _aggregate command:
|
||||
http://docs.mongodb.org/manual/applications/aggregation
|
||||
https://mongodb.com/docs/manual/applications/aggregation
|
||||
|
||||
"""
|
||||
cursor_class = create_class_with_framework(
|
||||
@ -1123,7 +1123,7 @@ class AgnosticCollection(AgnosticBaseProperties):
|
||||
.. mongodoc:: changeStreams
|
||||
|
||||
.. _change streams specification:
|
||||
https://github.com/mongodb/specifications/blob/master/source/change-streams.rst
|
||||
https://github.com/mongodb/specifications/blob/master/source/change-streams/change-streams.rst
|
||||
"""
|
||||
cursor_class = create_class_with_framework(
|
||||
AgnosticChangeStream, self._framework, self.__module__
|
||||
@ -1290,7 +1290,7 @@ class AgnosticBaseCursor(AgnosticBase):
|
||||
.. versionchanged:: 2.2
|
||||
Deprecated.
|
||||
|
||||
.. _`large batches`: https://docs.mongodb.com/manual/tutorial/iterate-a-cursor/#cursor-batches
|
||||
.. _`large batches`: https://www.mongodb.com/docs/manual/tutorial/iterate-a-cursor/#cursor-batches
|
||||
.. _`gen.coroutine`: http://tornadoweb.org/en/stable/gen.html
|
||||
"""
|
||||
warnings.warn(
|
||||
|
||||
@ -107,8 +107,8 @@ For example, to list all non-system collections::
|
||||
- `filter` (optional): A query document to filter the list of
|
||||
collections returned from the listCollections command.
|
||||
- `**kwargs` (optional): Optional parameters of the
|
||||
`listCollections command
|
||||
<https://docs.mongodb.com/manual/reference/command/listCollections/>`_
|
||||
`listCollections
|
||||
<https://www.mongodb.com/docs/manual/reference/command/listCollections/>`_ comand.
|
||||
can be passed as keyword arguments to this method. The supported
|
||||
options differ by server version.
|
||||
|
||||
@ -768,7 +768,7 @@ Returns a Future.
|
||||
mapReduce on a secondary use the :meth:`inline_map_reduce`
|
||||
method instead.
|
||||
|
||||
.. _map reduce command: http://docs.mongodb.org/manual/reference/command/mapReduce/
|
||||
.. _map reduce command: https://mongodb.com/docs/manual/reference/command/mapReduce/
|
||||
|
||||
.. mongodoc:: mapreduce
|
||||
|
||||
@ -1138,8 +1138,8 @@ Only the last call to :meth:`where` applied to a
|
||||
:Parameters:
|
||||
- `code`: JavaScript expression to use as a filter
|
||||
|
||||
.. _$expr: https://docs.mongodb.com/manual/reference/operator/query/expr/
|
||||
.. _$where: https://docs.mongodb.com/manual/reference/operator/query/where/
|
||||
.. _$expr: https://mongodb.com/docs/manual/reference/operator/query/expr/
|
||||
.. _$where: https://mongodb.com/docs/manual/reference/operator/query/where/
|
||||
"""
|
||||
|
||||
create_data_key_doc = """Create and insert a new data key into the key vault collection.
|
||||
|
||||
@ -250,7 +250,7 @@ Metadata set on the file appears as attributes on a
|
||||
:meth:`~motor.MotorGridFSBucket.open_upload_stream`.
|
||||
|
||||
Any of the file level options specified in the `GridFS Spec
|
||||
<http://dochub.mongodb.org/core/gridfs>`_ may be passed as
|
||||
<http://dochub.mongodb.org/core/gridfs/>`_ may be passed as
|
||||
keyword arguments. Any additional keyword arguments will be
|
||||
set as additional fields on the file document. Valid keyword
|
||||
arguments include:
|
||||
|
||||
6
tox.ini
6
tox.ini
@ -91,6 +91,12 @@ changedir = doc
|
||||
commands =
|
||||
sphinx-build -q -E -b doctest . {envtmpdir}/doctest {posargs}
|
||||
|
||||
[testenv:py3-sphinx-linkcheck]
|
||||
setenv = PYTHONHASHSEED=0
|
||||
changedir = doc
|
||||
commands =
|
||||
sphinx-build -q -E -b linkcheck . {envtmpdir}/linkcheck {posargs}
|
||||
|
||||
[testenv:py3-pymongo-latest]
|
||||
commands =
|
||||
pip install git+https://github.com/mongodb/mongo-python-driver.git@master#egg=pymongo[encryption]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user