Skip to content

Commit f5eec45

Browse files
authored
PYTHON-3111 Rename "Versioned API" to "Stable API" in documentation (mongodb#867)
1 parent a0fe7c0 commit f5eec45

File tree

9 files changed

+18
-18
lines changed

9 files changed

+18
-18
lines changed

.evergreen/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2561,7 +2561,7 @@ buildvariants:
25612561
tasks:
25622562
- name: atlas-data-lake-tests
25632563

2564-
- matrix_name: "versioned-api-tests"
2564+
- matrix_name: "stable-api-tests"
25652565
matrix_spec:
25662566
platform: ubuntu-18.04
25672567
python-version: ["3.6", "3.10"]

.evergreen/resync-specs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ do
136136
uri|uri*options)
137137
cpjson uri-options/tests uri_options
138138
;;
139-
versioned-api)
139+
stable-api)
140140
cpjson versioned-api/tests versioned-api
141141
;;
142142
*)

doc/api/pymongo/server_api.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
:mod:`server_api` -- Support for MongoDB Versioned API
1+
:mod:`server_api` -- Support for MongoDB Stable API
22
======================================================
33

44
.. automodule:: pymongo.server_api
5-
:synopsis: Support for MongoDB Versioned API
5+
:synopsis: Support for MongoDB Stable API
66

77
.. autoclass:: pymongo.server_api.ServerApi
88
:members:

doc/changelog.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ Notable improvements
258258
....................
259259

260260
- Added support for MongoDB 5.0.
261-
- Support for MongoDB Versioned API, see :class:`~pymongo.server_api.ServerApi`.
261+
- Support for MongoDB Stable API, see :class:`~pymongo.server_api.ServerApi`.
262262
- Support for snapshot reads on secondaries (see :ref:`snapshot-reads-ref`).
263263
- Support for Azure and GCP KMS providers for client side field level
264264
encryption. See the docstring for :class:`~pymongo.mongo_client.MongoClient`,

pymongo/database.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ def command(
686686
.. note:: :meth:`command` does **not** apply any custom TypeDecoders
687687
when decoding the command response.
688688
689-
.. note:: If this client has been configured to use MongoDB Versioned
689+
.. note:: If this client has been configured to use MongoDB Stable
690690
API (see :ref:`versioned-api-ref`), then :meth:`command` will
691691
automactically add API versioning options to the given command.
692692
Explicitly adding API versioning options in the command and

pymongo/mongo_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -515,12 +515,12 @@ def __init__(
515515
- ``bypass_auto_encrpytion=False`` is passed to
516516
:class:`~pymongo.encryption_options.AutoEncryptionOpts`
517517
518-
| **Versioned API options:**
519-
| (If not set explicitly, Versioned API will not be enabled.)
518+
| **Stable API options:**
519+
| (If not set explicitly, Stable API will not be enabled.)
520520
521521
- `server_api`: A
522522
:class:`~pymongo.server_api.ServerApi` which configures this
523-
client to use Versioned API. See :ref:`versioned-api-ref` for
523+
client to use Stable API. See :ref:`versioned-api-ref` for
524524
details.
525525
526526
.. seealso:: The MongoDB documentation on `connections <https://dochub.mongodb.org/core/connections>`_.

pymongo/pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ def unpin(self):
587587

588588
def hello_cmd(self):
589589
# Handshake spec requires us to use OP_MSG+hello command for the
590-
# initial handshake in load balanced or versioned api mode.
590+
# initial handshake in load balanced or stable API mode.
591591
if self.opts.server_api or self.hello_ok or self.opts.load_balanced:
592592
self.op_msg_enabled = True
593593
return SON([(HelloCompat.CMD, 1)])

pymongo/server_api.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
# implied. See the License for the specific language governing
1313
# permissions and limitations under the License.
1414

15-
"""Support for MongoDB Versioned API.
15+
"""Support for MongoDB Stable API.
1616
1717
.. _versioned-api-ref:
1818
19-
MongoDB Versioned API
19+
MongoDB Stable API
2020
=====================
2121
2222
Starting in MongoDB 5.0, applications can specify the server API version
@@ -27,9 +27,9 @@
2727
Declaring an API Version
2828
````````````````````````
2929
30-
.. attention:: Versioned API requires MongoDB >=5.0.
30+
.. attention:: Stable API requires MongoDB >=5.0.
3131
32-
To configure MongoDB Versioned API, pass the ``server_api`` keyword option to
32+
To configure MongoDB Stable API, pass the ``server_api`` keyword option to
3333
:class:`~pymongo.mongo_client.MongoClient`::
3434
3535
>>> from pymongo.mongo_client import MongoClient
@@ -44,7 +44,7 @@
4444
:meth:`~pymongo.database.Database.command` helper.
4545
4646
.. note:: Declaring an API version on the
47-
:class:`~pymongo.mongo_client.MongoClient` **and** specifying versioned
47+
:class:`~pymongo.mongo_client.MongoClient` **and** specifying stable
4848
API options in :meth:`~pymongo.database.Database.command` command document
4949
is not supported and will lead to undefined behaviour.
5050
@@ -96,10 +96,10 @@ class ServerApiVersion:
9696

9797

9898
class ServerApi(object):
99-
"""MongoDB Versioned API."""
99+
"""MongoDB Stable API."""
100100

101101
def __init__(self, version, strict=None, deprecation_errors=None):
102-
"""Options to configure MongoDB Versioned API.
102+
"""Options to configure MongoDB Stable API.
103103
104104
:Parameters:
105105
- `version`: The API version string. Must be one of the values in

test/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ def sanitize_cmd(cmd):
913913
cp.pop("$readPreference", None)
914914
cp.pop("lsid", None)
915915
if MONGODB_API_VERSION:
916-
# Versioned api parameters
916+
# Stable API parameters
917917
cp.pop("apiVersion", None)
918918
# OP_MSG encoding may move the payload type one field to the
919919
# end of the command. Do the same here.

0 commit comments

Comments
 (0)