PYTHON-4813 Update specification documentation links (#1977)
This commit is contained in:
parent
2332d69328
commit
351196b91b
@ -11,7 +11,7 @@ The PyMongo distribution contains tools for interacting with MongoDB
|
||||
database from Python. The `bson` package is an implementation of the
|
||||
[BSON format](http://bsonspec.org) for Python. The `pymongo` package is
|
||||
a native Python driver for MongoDB. The `gridfs` package is a
|
||||
[gridfs](https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.rst/)
|
||||
[gridfs](https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.md/)
|
||||
implementation on top of `pymongo`.
|
||||
|
||||
PyMongo supports MongoDB 4.0, 4.2, 4.4, 5.0, 6.0, 7.0, and 8.0.
|
||||
|
||||
@ -22,7 +22,7 @@ is emitted and parsed, with the default being the Relaxed Extended JSON format.
|
||||
when :const:`CANONICAL_JSON_OPTIONS` or :const:`LEGACY_JSON_OPTIONS` is
|
||||
provided, respectively.
|
||||
|
||||
.. _Extended JSON: https://github.com/mongodb/specifications/blob/master/source/extended-json.rst
|
||||
.. _Extended JSON: https://github.com/mongodb/specifications/blob/master/source/extended-json/extended-json.md
|
||||
|
||||
Example usage (deserialization):
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ interacting with MongoDB. :mod:`bson` is an implementation of the
|
||||
`BSON format <http://bsonspec.org>`_, :mod:`pymongo` is a
|
||||
full-featured driver for MongoDB, and :mod:`gridfs` is a set of tools
|
||||
for working with the `GridFS
|
||||
<https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.rst/>`_ storage
|
||||
<https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.md/>`_ storage
|
||||
specification.
|
||||
|
||||
.. toctree::
|
||||
|
||||
@ -1027,7 +1027,7 @@ See the `PyMongo 4.0 release notes in JIRA`_ for the list of resolved issues
|
||||
in this release.
|
||||
|
||||
.. _PyMongo 4.0 release notes in JIRA: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=18463
|
||||
.. _DBRef specification: https://github.com/mongodb/specifications/blob/5a8c8d7/source/dbref.rst
|
||||
.. _DBRef specification: https://github.com/mongodb/specifications/blob/master/source/dbref/dbref.md
|
||||
|
||||
Changes in Version 3.13.0 (2022/11/01)
|
||||
--------------------------------------
|
||||
@ -1562,7 +1562,7 @@ Unavoidable breaking changes:
|
||||
bumped to 1.16.0. This is a breaking change for applications that use
|
||||
PyMongo's SRV support with a version of ``dnspython`` older than 1.16.0.
|
||||
|
||||
.. _URI options specification: https://github.com/mongodb/specifications/blob/master/source/uri-options/uri-options.rst
|
||||
.. _URI options specification: https://github.com/mongodb/specifications/blob/master/source/uri-options/uri-options.md
|
||||
|
||||
|
||||
Issues Resolved
|
||||
@ -1586,7 +1586,7 @@ Changes in Version 3.8.0 (2019/04/22)
|
||||
must upgrade to PyPy3.5+.
|
||||
|
||||
- :class:`~bson.objectid.ObjectId` now implements the `ObjectID specification
|
||||
version 0.2 <https://github.com/mongodb/specifications/blob/master/source/objectid.rst>`_.
|
||||
version 0.2 <https://github.com/mongodb/specifications/blob/master/source/bson-objectid/objectid.md>`_.
|
||||
- For better performance and to better follow the GridFS spec,
|
||||
:class:`~gridfs.grid_file.GridOut` now uses a single cursor to read all the
|
||||
chunks in the file. Previously, each chunk in the file was queried
|
||||
@ -1948,7 +1948,7 @@ Highlights include:
|
||||
:class:`~pymongo.operations.UpdateOne`, and
|
||||
:class:`~pymongo.operations.UpdateMany`.
|
||||
- Implemented the `MongoDB Extended JSON
|
||||
<https://github.com/mongodb/specifications/blob/master/source/extended-json.rst>`_
|
||||
<https://github.com/mongodb/specifications/blob/master/source/extended-json/extended-json.md>`_
|
||||
specification.
|
||||
- :class:`~bson.decimal128.Decimal128` now works when cdecimal is installed.
|
||||
- PyMongo is now tested against a wider array of operating systems and CPU
|
||||
|
||||
@ -85,7 +85,7 @@ pygments_style = "sphinx"
|
||||
# wiki.centos.org has been flakey.
|
||||
# sourceforge.net is giving a 403 error, but is still accessible from the browser.
|
||||
linkcheck_ignore = [
|
||||
"https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-monitoring.rst#requesting-an-immediate-check",
|
||||
"https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-monitoring.md#requesting-an-immediate-check",
|
||||
"https://github.com/mongodb/libmongocrypt/blob/master/bindings/python/README.rst#installing-from-source",
|
||||
r"https://wiki.centos.org/[\w/]*",
|
||||
r"http://sourceforge.net/",
|
||||
|
||||
@ -106,7 +106,7 @@ Thus the current design of periodic executors is surprisingly simple: they
|
||||
do a simple ``time.sleep`` for a half-second, check if it is time to wake or
|
||||
terminate, and sleep again.
|
||||
|
||||
.. _Server Discovery And Monitoring Spec: https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-monitoring.rst#requesting-an-immediate-check
|
||||
.. _Server Discovery And Monitoring Spec: https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-monitoring.md#requesting-an-immediate-check
|
||||
|
||||
.. _PYTHON-863: https://jira.mongodb.org/browse/PYTHON-863
|
||||
|
||||
|
||||
@ -84,7 +84,7 @@ Finally, the same UUID would historically be serialized by the Java driver as::
|
||||
.. note:: For in-depth information about the the byte-order historically
|
||||
used by different drivers, see the `Handling of Native UUID Types
|
||||
Specification
|
||||
<https://github.com/mongodb/specifications/blob/master/source/uuid.rst>`_.
|
||||
<https://github.com/mongodb/specifications/blob/master/source/bson-binary-uuid/uuid.md>`_.
|
||||
|
||||
This difference in the byte-order of UUIDs encoded by different drivers can
|
||||
result in highly unintuitive behavior in some scenarios. We detail two such
|
||||
|
||||
@ -118,7 +118,7 @@ Renamed URI options
|
||||
|
||||
Several deprecated URI options have been renamed to the standardized
|
||||
option names defined in the
|
||||
`URI options specification <https://github.com/mongodb/specifications/blob/master/source/uri-options/uri-options.rst>`_.
|
||||
`URI options specification <https://github.com/mongodb/specifications/blob/master/source/uri-options/uri-options.md>`_.
|
||||
The old option names and their renamed equivalents are summarized in the table
|
||||
below. Some renamed options have different semantics from the option being
|
||||
replaced as noted in the 'Migration Notes' column.
|
||||
@ -965,7 +965,7 @@ correct type. Otherwise the document is returned as normal. Previously, any
|
||||
subdocument containing a ``$ref`` field would be decoded as a
|
||||
:class:`~bson.dbref.DBRef`.
|
||||
|
||||
.. _DBRef specification: https://github.com/mongodb/specifications/blob/5a8c8d7/source/dbref.rst
|
||||
.. _DBRef specification: https://github.com/mongodb/specifications/blob/master/source/dbref/dbref.md
|
||||
|
||||
Encoding a UUID raises an error by default
|
||||
..........................................
|
||||
|
||||
@ -221,7 +221,7 @@ class AsyncMongoClient(common.BaseObject, Generic[_DocumentType]):
|
||||
<https://en.wikipedia.org/wiki/TXT_record>`_. See the
|
||||
`Initial DNS Seedlist Discovery spec
|
||||
<https://github.com/mongodb/specifications/blob/master/source/
|
||||
initial-dns-seedlist-discovery/initial-dns-seedlist-discovery.rst>`_
|
||||
initial-dns-seedlist-discovery/initial-dns-seedlist-discovery.md>`_
|
||||
for more details. Note that the use of SRV URIs implicitly enables
|
||||
TLS support. Pass tls=false in the URI to override.
|
||||
|
||||
@ -367,7 +367,7 @@ class AsyncMongoClient(common.BaseObject, Generic[_DocumentType]):
|
||||
:meth:`~pymongo.asynchronous.collection.AsyncCollection.aggregate` using the ``$out``
|
||||
pipeline operator and any operation with an unacknowledged write
|
||||
concern (e.g. {w: 0})). See
|
||||
https://github.com/mongodb/specifications/blob/master/source/retryable-writes/retryable-writes.rst
|
||||
https://github.com/mongodb/specifications/blob/master/source/retryable-writes/retryable-writes.md
|
||||
- `retryReads`: (boolean) Whether supported read operations
|
||||
executed within this AsyncMongoClient will be retried once after a
|
||||
network error. Defaults to ``True``.
|
||||
@ -394,7 +394,7 @@ class AsyncMongoClient(common.BaseObject, Generic[_DocumentType]):
|
||||
transient errors such as network failures, database upgrades, and
|
||||
replica set failovers. For an exact definition of which errors
|
||||
trigger a retry, see the `retryable reads specification
|
||||
<https://github.com/mongodb/specifications/blob/master/source/retryable-reads/retryable-reads.rst>`_.
|
||||
<https://github.com/mongodb/specifications/blob/master/source/retryable-reads/retryable-reads.md>`_.
|
||||
|
||||
- `compressors`: Comma separated list of compressors for wire
|
||||
protocol compression. The list is used to negotiate a compressor
|
||||
|
||||
@ -216,7 +216,7 @@ def _metadata_env() -> dict[str, Any]:
|
||||
_MAX_METADATA_SIZE = 512
|
||||
|
||||
|
||||
# See: https://github.com/mongodb/specifications/blob/5112bcc/source/mongodb-handshake/handshake.rst#limitations
|
||||
# See: https://github.com/mongodb/specifications/blob/master/source/mongodb-handshake/handshake.md#limitations
|
||||
def _truncate_metadata(metadata: MutableMapping[str, Any]) -> None:
|
||||
"""Perform metadata truncation."""
|
||||
if len(bson.encode(metadata)) <= _MAX_METADATA_SIZE:
|
||||
|
||||
@ -216,7 +216,7 @@ class MongoClient(common.BaseObject, Generic[_DocumentType]):
|
||||
<https://en.wikipedia.org/wiki/TXT_record>`_. See the
|
||||
`Initial DNS Seedlist Discovery spec
|
||||
<https://github.com/mongodb/specifications/blob/master/source/
|
||||
initial-dns-seedlist-discovery/initial-dns-seedlist-discovery.rst>`_
|
||||
initial-dns-seedlist-discovery/initial-dns-seedlist-discovery.md>`_
|
||||
for more details. Note that the use of SRV URIs implicitly enables
|
||||
TLS support. Pass tls=false in the URI to override.
|
||||
|
||||
@ -365,7 +365,7 @@ class MongoClient(common.BaseObject, Generic[_DocumentType]):
|
||||
:meth:`~pymongo.collection.Collection.aggregate` using the ``$out``
|
||||
pipeline operator and any operation with an unacknowledged write
|
||||
concern (e.g. {w: 0})). See
|
||||
https://github.com/mongodb/specifications/blob/master/source/retryable-writes/retryable-writes.rst
|
||||
https://github.com/mongodb/specifications/blob/master/source/retryable-writes/retryable-writes.md
|
||||
- `retryReads`: (boolean) Whether supported read operations
|
||||
executed within this MongoClient will be retried once after a
|
||||
network error. Defaults to ``True``.
|
||||
@ -392,7 +392,7 @@ class MongoClient(common.BaseObject, Generic[_DocumentType]):
|
||||
transient errors such as network failures, database upgrades, and
|
||||
replica set failovers. For an exact definition of which errors
|
||||
trigger a retry, see the `retryable reads specification
|
||||
<https://github.com/mongodb/specifications/blob/master/source/retryable-reads/retryable-reads.rst>`_.
|
||||
<https://github.com/mongodb/specifications/blob/master/source/retryable-reads/retryable-reads.md>`_.
|
||||
|
||||
- `compressors`: Comma separated list of compressors for wire
|
||||
protocol compression. The list is used to negotiate a compressor
|
||||
|
||||
@ -375,7 +375,7 @@ class TestSCRAMSHA1(AsyncIntegrationTest):
|
||||
await db.command("dbstats")
|
||||
|
||||
|
||||
# https://github.com/mongodb/specifications/blob/master/source/auth/auth.rst#scram-sha-256-and-mechanism-negotiation
|
||||
# https://github.com/mongodb/specifications/blob/master/source/auth/auth.md#scram-sha-256-and-mechanism-negotiation
|
||||
class TestSCRAM(AsyncIntegrationTest):
|
||||
@async_client_context.require_auth
|
||||
@async_client_context.require_version_min(3, 7, 2)
|
||||
|
||||
@ -1610,7 +1610,7 @@ class TestGCPEncryption(AzureGCPEncryptionTestMixin, AsyncEncryptionIntegrationT
|
||||
return await self._test_automatic(expected_document_extjson, {"secret_gcp": "string0"})
|
||||
|
||||
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst#deadlock-tests
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md#deadlock-tests
|
||||
class TestDeadlockProse(AsyncEncryptionIntegrationTest):
|
||||
async def asyncSetUp(self):
|
||||
self.client_test = await self.async_rs_or_single_client(
|
||||
@ -1837,7 +1837,7 @@ class TestDeadlockProse(AsyncEncryptionIntegrationTest):
|
||||
self.assertEqual(len(self.topology_listener.results["opened"]), 1)
|
||||
|
||||
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst#14-decryption-events
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md#14-decryption-events
|
||||
class TestDecryptProse(AsyncEncryptionIntegrationTest):
|
||||
async def asyncSetUp(self):
|
||||
self.client = async_client_context.client
|
||||
@ -1909,7 +1909,7 @@ class TestDecryptProse(AsyncEncryptionIntegrationTest):
|
||||
self.assertEqual(event.reply["cursor"]["firstBatch"][0]["encrypted"], self.cipher_text)
|
||||
|
||||
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst#bypass-spawning-mongocryptd
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md#bypass-spawning-mongocryptd
|
||||
class TestBypassSpawningMongocryptdProse(AsyncEncryptionIntegrationTest):
|
||||
@unittest.skipIf(
|
||||
os.environ.get("TEST_CRYPT_SHARED"),
|
||||
@ -1990,7 +1990,7 @@ class TestBypassSpawningMongocryptdProse(AsyncEncryptionIntegrationTest):
|
||||
with self.assertRaises(ServerSelectionTimeoutError):
|
||||
await no_mongocryptd_client.db.command("ping")
|
||||
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst#20-bypass-creating-mongocryptd-client-when-shared-library-is-loaded
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md#20-bypass-creating-mongocryptd-client-when-shared-library-is-loaded
|
||||
@unittest.skipUnless(os.environ.get("TEST_CRYPT_SHARED"), "crypt_shared lib is not installed")
|
||||
async def test_client_via_loading_shared_library(self):
|
||||
connection_established = False
|
||||
@ -2066,7 +2066,7 @@ class TestKmsTLSProse(AsyncEncryptionIntegrationTest):
|
||||
await self.client_encrypted.create_data_key("aws", master_key=key)
|
||||
|
||||
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst#kms-tls-options-tests
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md#kms-tls-options-tests
|
||||
class TestKmsTLSOptions(AsyncEncryptionIntegrationTest):
|
||||
@unittest.skipUnless(any(AWS_CREDS.values()), "AWS environment credentials are not set")
|
||||
async def asyncSetUp(self):
|
||||
@ -2272,7 +2272,7 @@ class TestKmsTLSOptions(AsyncEncryptionIntegrationTest):
|
||||
await self.client_encryption_with_names.create_data_key("kmip:with_tls")
|
||||
|
||||
|
||||
# https://github.com/mongodb/specifications/blob/50e26fe/source/client-side-encryption/tests/README.rst#unique-index-on-keyaltnames
|
||||
# https://github.com/mongodb/specifications/blob/50e26fe/source/client-side-encryption/tests/README.md#unique-index-on-keyaltnames
|
||||
class TestUniqueIndexOnKeyAltNamesProse(AsyncEncryptionIntegrationTest):
|
||||
async def asyncSetUp(self):
|
||||
self.client = async_client_context.client
|
||||
@ -2303,7 +2303,7 @@ class TestUniqueIndexOnKeyAltNamesProse(AsyncEncryptionIntegrationTest):
|
||||
assert key_doc["keyAltNames"] == ["def"]
|
||||
|
||||
|
||||
# https://github.com/mongodb/specifications/blob/d4c9432/source/client-side-encryption/tests/README.rst#explicit-encryption
|
||||
# https://github.com/mongodb/specifications/blob/d4c9432/source/client-side-encryption/tests/README.md#explicit-encryption
|
||||
class TestExplicitQueryableEncryption(AsyncEncryptionIntegrationTest):
|
||||
@async_client_context.require_no_standalone
|
||||
@async_client_context.require_version_min(7, 0, -1)
|
||||
@ -2423,7 +2423,7 @@ class TestExplicitQueryableEncryption(AsyncEncryptionIntegrationTest):
|
||||
self.assertEqual(decrypted, val)
|
||||
|
||||
|
||||
# https://github.com/mongodb/specifications/blob/072601/source/client-side-encryption/tests/README.rst#rewrap
|
||||
# https://github.com/mongodb/specifications/blob/072601/source/client-side-encryption/tests/README.md#rewrap
|
||||
class TestRewrapWithSeparateClientEncryption(AsyncEncryptionIntegrationTest):
|
||||
MASTER_KEYS: Mapping[str, Mapping[str, Any]] = {
|
||||
"aws": {
|
||||
@ -2505,7 +2505,7 @@ class TestRewrapWithSeparateClientEncryption(AsyncEncryptionIntegrationTest):
|
||||
)
|
||||
|
||||
|
||||
# https://github.com/mongodb/specifications/blob/5cf3ed/source/client-side-encryption/tests/README.rst#on-demand-aws-credentials
|
||||
# https://github.com/mongodb/specifications/blob/5cf3ed/source/client-side-encryption/tests/README.md#on-demand-aws-credentials
|
||||
class TestOnDemandAWSCredentials(AsyncEncryptionIntegrationTest):
|
||||
async def asyncSetUp(self):
|
||||
await super().asyncSetUp()
|
||||
@ -2869,7 +2869,7 @@ class TestRangeQueryDefaultsProse(AsyncEncryptionIntegrationTest):
|
||||
assert len(payload) > len(self.payload_defaults)
|
||||
|
||||
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst#automatic-data-encryption-keys
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md#automatic-data-encryption-keys
|
||||
class TestAutomaticDecryptionKeys(AsyncEncryptionIntegrationTest):
|
||||
@async_client_context.require_no_standalone
|
||||
@async_client_context.require_version_min(7, 0, -1)
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
"""Unified test format runner.
|
||||
|
||||
https://github.com/mongodb/specifications/blob/master/source/unified-test-format/unified-test-format.rst
|
||||
https://github.com/mongodb/specifications/blob/master/source/unified-test-format/unified-test-format.md
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
@ -431,7 +431,7 @@ class UnifiedSpecTestMixinV1(AsyncIntegrationTest):
|
||||
"""Mixin class to run test cases from test specification files.
|
||||
|
||||
Assumes that tests conform to the `unified test format
|
||||
<https://github.com/mongodb/specifications/blob/master/source/unified-test-format/unified-test-format.rst>`_.
|
||||
<https://github.com/mongodb/specifications/blob/master/source/unified-test-format/unified-test-format.md>`_.
|
||||
|
||||
Specification of the test suite being currently run is available as
|
||||
a class attribute ``TEST_SPEC``.
|
||||
|
||||
@ -373,7 +373,7 @@ class TestSCRAMSHA1(IntegrationTest):
|
||||
db.command("dbstats")
|
||||
|
||||
|
||||
# https://github.com/mongodb/specifications/blob/master/source/auth/auth.rst#scram-sha-256-and-mechanism-negotiation
|
||||
# https://github.com/mongodb/specifications/blob/master/source/auth/auth.md#scram-sha-256-and-mechanism-negotiation
|
||||
class TestSCRAM(IntegrationTest):
|
||||
@client_context.require_auth
|
||||
@client_context.require_version_min(3, 7, 2)
|
||||
|
||||
@ -128,7 +128,7 @@ class TestDBRef(unittest.TestCase):
|
||||
self.assertNotEqual(hash(dbref_1a), hash(dbref_2a))
|
||||
|
||||
|
||||
# https://github.com/mongodb/specifications/blob/master/source/dbref.rst#test-plan
|
||||
# https://github.com/mongodb/specifications/blob/master/source/dbref/dbref.md#test-plan
|
||||
class TestDBRefSpec(unittest.TestCase):
|
||||
def test_decoding_1_2_3(self):
|
||||
doc: Any
|
||||
|
||||
@ -1604,7 +1604,7 @@ class TestGCPEncryption(AzureGCPEncryptionTestMixin, EncryptionIntegrationTest):
|
||||
return self._test_automatic(expected_document_extjson, {"secret_gcp": "string0"})
|
||||
|
||||
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst#deadlock-tests
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md#deadlock-tests
|
||||
class TestDeadlockProse(EncryptionIntegrationTest):
|
||||
def setUp(self):
|
||||
self.client_test = self.rs_or_single_client(
|
||||
@ -1829,7 +1829,7 @@ class TestDeadlockProse(EncryptionIntegrationTest):
|
||||
self.assertEqual(len(self.topology_listener.results["opened"]), 1)
|
||||
|
||||
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst#14-decryption-events
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md#14-decryption-events
|
||||
class TestDecryptProse(EncryptionIntegrationTest):
|
||||
def setUp(self):
|
||||
self.client = client_context.client
|
||||
@ -1901,7 +1901,7 @@ class TestDecryptProse(EncryptionIntegrationTest):
|
||||
self.assertEqual(event.reply["cursor"]["firstBatch"][0]["encrypted"], self.cipher_text)
|
||||
|
||||
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst#bypass-spawning-mongocryptd
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md#bypass-spawning-mongocryptd
|
||||
class TestBypassSpawningMongocryptdProse(EncryptionIntegrationTest):
|
||||
@unittest.skipIf(
|
||||
os.environ.get("TEST_CRYPT_SHARED"),
|
||||
@ -1982,7 +1982,7 @@ class TestBypassSpawningMongocryptdProse(EncryptionIntegrationTest):
|
||||
with self.assertRaises(ServerSelectionTimeoutError):
|
||||
no_mongocryptd_client.db.command("ping")
|
||||
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst#20-bypass-creating-mongocryptd-client-when-shared-library-is-loaded
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md#20-bypass-creating-mongocryptd-client-when-shared-library-is-loaded
|
||||
@unittest.skipUnless(os.environ.get("TEST_CRYPT_SHARED"), "crypt_shared lib is not installed")
|
||||
def test_client_via_loading_shared_library(self):
|
||||
connection_established = False
|
||||
@ -2058,7 +2058,7 @@ class TestKmsTLSProse(EncryptionIntegrationTest):
|
||||
self.client_encrypted.create_data_key("aws", master_key=key)
|
||||
|
||||
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst#kms-tls-options-tests
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md#kms-tls-options-tests
|
||||
class TestKmsTLSOptions(EncryptionIntegrationTest):
|
||||
@unittest.skipUnless(any(AWS_CREDS.values()), "AWS environment credentials are not set")
|
||||
def setUp(self):
|
||||
@ -2264,7 +2264,7 @@ class TestKmsTLSOptions(EncryptionIntegrationTest):
|
||||
self.client_encryption_with_names.create_data_key("kmip:with_tls")
|
||||
|
||||
|
||||
# https://github.com/mongodb/specifications/blob/50e26fe/source/client-side-encryption/tests/README.rst#unique-index-on-keyaltnames
|
||||
# https://github.com/mongodb/specifications/blob/50e26fe/source/client-side-encryption/tests/README.md#unique-index-on-keyaltnames
|
||||
class TestUniqueIndexOnKeyAltNamesProse(EncryptionIntegrationTest):
|
||||
def setUp(self):
|
||||
self.client = client_context.client
|
||||
@ -2293,7 +2293,7 @@ class TestUniqueIndexOnKeyAltNamesProse(EncryptionIntegrationTest):
|
||||
assert key_doc["keyAltNames"] == ["def"]
|
||||
|
||||
|
||||
# https://github.com/mongodb/specifications/blob/d4c9432/source/client-side-encryption/tests/README.rst#explicit-encryption
|
||||
# https://github.com/mongodb/specifications/blob/d4c9432/source/client-side-encryption/tests/README.md#explicit-encryption
|
||||
class TestExplicitQueryableEncryption(EncryptionIntegrationTest):
|
||||
@client_context.require_no_standalone
|
||||
@client_context.require_version_min(7, 0, -1)
|
||||
@ -2407,7 +2407,7 @@ class TestExplicitQueryableEncryption(EncryptionIntegrationTest):
|
||||
self.assertEqual(decrypted, val)
|
||||
|
||||
|
||||
# https://github.com/mongodb/specifications/blob/072601/source/client-side-encryption/tests/README.rst#rewrap
|
||||
# https://github.com/mongodb/specifications/blob/072601/source/client-side-encryption/tests/README.md#rewrap
|
||||
class TestRewrapWithSeparateClientEncryption(EncryptionIntegrationTest):
|
||||
MASTER_KEYS: Mapping[str, Mapping[str, Any]] = {
|
||||
"aws": {
|
||||
@ -2489,7 +2489,7 @@ class TestRewrapWithSeparateClientEncryption(EncryptionIntegrationTest):
|
||||
)
|
||||
|
||||
|
||||
# https://github.com/mongodb/specifications/blob/5cf3ed/source/client-side-encryption/tests/README.rst#on-demand-aws-credentials
|
||||
# https://github.com/mongodb/specifications/blob/5cf3ed/source/client-side-encryption/tests/README.md#on-demand-aws-credentials
|
||||
class TestOnDemandAWSCredentials(EncryptionIntegrationTest):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
@ -2851,7 +2851,7 @@ class TestRangeQueryDefaultsProse(EncryptionIntegrationTest):
|
||||
assert len(payload) > len(self.payload_defaults)
|
||||
|
||||
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst#automatic-data-encryption-keys
|
||||
# https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md#automatic-data-encryption-keys
|
||||
class TestAutomaticDecryptionKeys(EncryptionIntegrationTest):
|
||||
@client_context.require_no_standalone
|
||||
@client_context.require_version_min(7, 0, -1)
|
||||
|
||||
@ -142,7 +142,7 @@ class TestStreamingProtocol(IntegrationTest):
|
||||
@client_context.require_failCommand_appName
|
||||
def test_monitor_waits_after_server_check_error(self):
|
||||
# This test implements:
|
||||
# https://github.com/mongodb/specifications/blob/6c5b2ac/source/server-discovery-and-monitoring/server-discovery-and-monitoring-tests.rst#monitors-sleep-at-least-minheartbeatfreqencyms-between-checks
|
||||
# https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring-tests.md#monitors-sleep-at-least-minheartbeatfreqencyms-between-checks
|
||||
fail_hello = {
|
||||
"mode": {"times": 5},
|
||||
"data": {
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
"""Unified test format runner.
|
||||
|
||||
https://github.com/mongodb/specifications/blob/master/source/unified-test-format/unified-test-format.rst
|
||||
https://github.com/mongodb/specifications/blob/master/source/unified-test-format/unified-test-format.md
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
@ -431,7 +431,7 @@ class UnifiedSpecTestMixinV1(IntegrationTest):
|
||||
"""Mixin class to run test cases from test specification files.
|
||||
|
||||
Assumes that tests conform to the `unified test format
|
||||
<https://github.com/mongodb/specifications/blob/master/source/unified-test-format/unified-test-format.rst>`_.
|
||||
<https://github.com/mongodb/specifications/blob/master/source/unified-test-format/unified-test-format.md>`_.
|
||||
|
||||
Specification of the test suite being currently run is available as
|
||||
a class attribute ``TEST_SPEC``.
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
"""Shared utility functions and constants for the unified test format runner.
|
||||
|
||||
https://github.com/mongodb/specifications/blob/master/source/unified-test-format/unified-test-format.rst
|
||||
https://github.com/mongodb/specifications/blob/master/source/unified-test-format/unified-test-format.md
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user