diff --git a/.evergreen/config.yml b/.evergreen/config.yml index d17054169f..43052771f4 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -2555,7 +2555,7 @@ buildvariants: tasks: - name: atlas-data-lake-tests -- matrix_name: "versioned-api-tests" +- matrix_name: "stable-api-tests" matrix_spec: platform: ubuntu-18.04 python-version: ["3.6", "3.10"] diff --git a/.evergreen/resync-specs.sh b/.evergreen/resync-specs.sh index 1d0742258b..eddd8c5fcb 100755 --- a/.evergreen/resync-specs.sh +++ b/.evergreen/resync-specs.sh @@ -134,7 +134,7 @@ do uri|uri*options) cpjson uri-options/tests uri_options ;; - versioned-api) + stable-api) cpjson versioned-api/tests versioned-api ;; *) diff --git a/doc/api/pymongo/server_api.rst b/doc/api/pymongo/server_api.rst index d961d07f1a..de74411aa4 100644 --- a/doc/api/pymongo/server_api.rst +++ b/doc/api/pymongo/server_api.rst @@ -1,8 +1,8 @@ -:mod:`server_api` -- Support for MongoDB Versioned API +:mod:`server_api` -- Support for MongoDB Stable API ====================================================== .. automodule:: pymongo.server_api - :synopsis: Support for MongoDB Versioned API + :synopsis: Support for MongoDB Stable API .. autoclass:: pymongo.server_api.ServerApi :members: diff --git a/doc/changelog.rst b/doc/changelog.rst index de38f188e4..7dd57d5329 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -258,7 +258,7 @@ Notable improvements .................... - Added support for MongoDB 5.0. -- Support for MongoDB Versioned API, see :class:`~pymongo.server_api.ServerApi`. +- Support for MongoDB Stable API, see :class:`~pymongo.server_api.ServerApi`. - Support for snapshot reads on secondaries (see :ref:`snapshot-reads-ref`). - Support for Azure and GCP KMS providers for client side field level encryption. See the docstring for :class:`~pymongo.mongo_client.MongoClient`, diff --git a/pymongo/database.py b/pymongo/database.py index e6633ed230..a5fc6974cf 100644 --- a/pymongo/database.py +++ b/pymongo/database.py @@ -686,7 +686,7 @@ def command( .. note:: :meth:`command` does **not** apply any custom TypeDecoders when decoding the command response. - .. note:: If this client has been configured to use MongoDB Versioned + .. note:: If this client has been configured to use MongoDB Stable API (see :ref:`versioned-api-ref`), then :meth:`command` will automactically add API versioning options to the given command. Explicitly adding API versioning options in the command and diff --git a/pymongo/mongo_client.py b/pymongo/mongo_client.py index 6b0d55601f..e18566bda4 100644 --- a/pymongo/mongo_client.py +++ b/pymongo/mongo_client.py @@ -516,12 +516,12 @@ def __init__( - ``bypass_auto_encrpytion=False`` is passed to :class:`~pymongo.encryption_options.AutoEncryptionOpts` - | **Versioned API options:** - | (If not set explicitly, Versioned API will not be enabled.) + | **Stable API options:** + | (If not set explicitly, Stable API will not be enabled.) - `server_api`: A :class:`~pymongo.server_api.ServerApi` which configures this - client to use Versioned API. See :ref:`versioned-api-ref` for + client to use Stable API. See :ref:`versioned-api-ref` for details. .. seealso:: The MongoDB documentation on `connections `_. diff --git a/pymongo/pool.py b/pymongo/pool.py index d616408ef8..0d40616465 100644 --- a/pymongo/pool.py +++ b/pymongo/pool.py @@ -590,7 +590,7 @@ def unpin(self): def hello_cmd(self): # Handshake spec requires us to use OP_MSG+hello command for the - # initial handshake in load balanced or versioned api mode. + # initial handshake in load balanced or stable API mode. if self.opts.server_api or self.hello_ok or self.opts.load_balanced: self.op_msg_enabled = True return SON([(HelloCompat.CMD, 1)]) diff --git a/pymongo/server_api.py b/pymongo/server_api.py index 110406366a..e92d6e6179 100644 --- a/pymongo/server_api.py +++ b/pymongo/server_api.py @@ -12,11 +12,11 @@ # implied. See the License for the specific language governing # permissions and limitations under the License. -"""Support for MongoDB Versioned API. +"""Support for MongoDB Stable API. .. _versioned-api-ref: -MongoDB Versioned API +MongoDB Stable API ===================== Starting in MongoDB 5.0, applications can specify the server API version @@ -27,9 +27,9 @@ Declaring an API Version ```````````````````````` -.. attention:: Versioned API requires MongoDB >=5.0. +.. attention:: Stable API requires MongoDB >=5.0. -To configure MongoDB Versioned API, pass the ``server_api`` keyword option to +To configure MongoDB Stable API, pass the ``server_api`` keyword option to :class:`~pymongo.mongo_client.MongoClient`:: >>> from pymongo.mongo_client import MongoClient @@ -44,7 +44,7 @@ :meth:`~pymongo.database.Database.command` helper. .. note:: Declaring an API version on the - :class:`~pymongo.mongo_client.MongoClient` **and** specifying versioned + :class:`~pymongo.mongo_client.MongoClient` **and** specifying stable API options in :meth:`~pymongo.database.Database.command` command document is not supported and will lead to undefined behaviour. @@ -96,10 +96,10 @@ class ServerApiVersion: class ServerApi(object): - """MongoDB Versioned API.""" + """MongoDB Stable API.""" def __init__(self, version, strict=None, deprecation_errors=None): - """Options to configure MongoDB Versioned API. + """Options to configure MongoDB Stable API. :Parameters: - `version`: The API version string. Must be one of the values in diff --git a/test/__init__.py b/test/__init__.py index 32220cfff3..27097c194f 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -918,7 +918,7 @@ def sanitize_cmd(cmd): cp.pop("$readPreference", None) cp.pop("lsid", None) if MONGODB_API_VERSION: - # Versioned api parameters + # Stable API parameters cp.pop("apiVersion", None) # OP_MSG encoding may move the payload type one field to the # end of the command. Do the same here.