Skip to content

Commit 04ff07e

Browse files
committed
Merge branch 'master' of github.com:mongodb/mongo-python-driver
2 parents 66935c0 + 5cba4c4 commit 04ff07e

24 files changed

+1728
-3866
lines changed

.evergreen/run-tests.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,6 @@ if [ -z "$GREEN_FRAMEWORK" ]; then
258258
# Use --capture=tee-sys so pytest prints test output inline:
259259
# https://docs.pytest.org/en/stable/how-to/capture-stdout-stderr.html
260260
python -m pytest -v --capture=tee-sys --durations=5 --maxfail=10 $TEST_ARGS
261-
if [ -z "$TEST_ARGS" ]; then # TODO: remove this in PYTHON-4528
262-
python -m pytest -v --capture=tee-sys --durations=5 --maxfail=10 test/synchronous/ $TEST_ARGS
263-
fi
264261
python -m pytest -v --capture=tee-sys --durations=5 --maxfail=10 test/asynchronous/ $TEST_ARGS
265262
else
266263
python green_framework_test.py $GREEN_FRAMEWORK -v $TEST_ARGS

.github/workflows/test-python.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,5 +206,4 @@ jobs:
206206
which python
207207
pip install -e ".[test]"
208208
pytest -v
209-
pytest -v test/synchronous/
210209
pytest -v test/asynchronous/

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ the pages will re-render and the browser will automatically refresh.
216216
`TEST_LOADBALANCER=1 tox -m test-eg`.
217217

218218
## Running Encryption Tests Locally
219+
- Clone `drivers-evergreen-tools`:
220+
`git clone [email protected]:mongodb-labs/drivers-evergreen-tools.git`.
221+
- Run `export DRIVERS_TOOLS=$PWD/drivers-evergreen-tools`
219222
- Run `AWS_PROFILE=<profile> tox -m setup-encryption` after setting up your AWS profile with `aws configure sso`.
220223
- Run the tests with `TEST_ENCRYPTION=1 tox -e test-eg`.
221224
- When done, run `tox -m teardown-encryption` to clean up.

mypy_test.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exclude = (?x)(
77
| ^test/conftest.py$
88
)
99

10-
[mypy-pymongo.synchronous.*,gridfs.synchronous.*,test.synchronous.*]
10+
[mypy-pymongo.synchronous.*,gridfs.synchronous.*,test.*]
1111
warn_unused_ignores = false
1212
disable_error_code = unused-coroutine
1313

pymongo/asynchronous/database.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ async def create_collection(
489489
:class:`~pymongo.collation.Collation`.
490490
:param session: a
491491
:class:`~pymongo.client_session.AsyncClientSession`.
492-
:param `check_exists`: if True (the default), send a listCollections command to
492+
:param check_exists: if True (the default), send a listCollections command to
493493
check if the collection already exists before creation.
494494
:param kwargs: additional keyword arguments will
495495
be passed as options for the `create collection command`_
@@ -949,7 +949,7 @@ async def cursor_command(
949949
read preference configured for the transaction.
950950
Otherwise, defaults to
951951
:attr:`~pymongo.read_preferences.ReadPreference.PRIMARY`.
952-
:param codec_options`: A :class:`~bson.codec_options.CodecOptions`
952+
:param codec_options: A :class:`~bson.codec_options.CodecOptions`
953953
instance.
954954
:param session: A
955955
:class:`~pymongo.client_session.AsyncClientSession`.

pymongo/asynchronous/encryption.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,10 +1005,10 @@ async def delete_key(self, id: Binary) -> DeleteResult:
10051005
async def add_key_alt_name(self, id: Binary, key_alt_name: str) -> Any:
10061006
"""Add ``key_alt_name`` to the set of alternate names in the key document with UUID ``key_id``.
10071007
1008-
:param `id`: The UUID of a key a which must be a
1008+
:param id: The UUID of a key a which must be a
10091009
:class:`~bson.binary.Binary` with subtype 4 (
10101010
:attr:`~bson.binary.UUID_SUBTYPE`).
1011-
:param `key_alt_name`: The key alternate name to add.
1011+
:param key_alt_name: The key alternate name to add.
10121012
10131013
:return: The previous version of the key document.
10141014
@@ -1037,10 +1037,10 @@ async def remove_key_alt_name(self, id: Binary, key_alt_name: str) -> Optional[R
10371037
10381038
Also removes the ``keyAltNames`` field from the key document if it would otherwise be empty.
10391039
1040-
:param `id`: The UUID of a key a which must be a
1040+
:param id: The UUID of a key a which must be a
10411041
:class:`~bson.binary.Binary` with subtype 4 (
10421042
:attr:`~bson.binary.UUID_SUBTYPE`).
1043-
:param `key_alt_name`: The key alternate name to remove.
1043+
:param key_alt_name: The key alternate name to remove.
10441044
10451045
:return: Returns the previous version of the key document.
10461046
@@ -1079,7 +1079,7 @@ async def rewrap_many_data_key(
10791079
:param filter: A document used to filter the data keys.
10801080
:param provider: The new KMS provider to use to encrypt the data keys,
10811081
or ``None`` to use the current KMS provider(s).
1082-
:param `master_key`: The master key fields corresponding to the new KMS
1082+
:param master_key: The master key fields corresponding to the new KMS
10831083
provider when ``provider`` is not ``None``.
10841084
10851085
:return: A :class:`RewrapManyDataKeyResult`.

pymongo/synchronous/database.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ def create_collection(
489489
:class:`~pymongo.collation.Collation`.
490490
:param session: a
491491
:class:`~pymongo.client_session.ClientSession`.
492-
:param `check_exists`: if True (the default), send a listCollections command to
492+
:param check_exists: if True (the default), send a listCollections command to
493493
check if the collection already exists before creation.
494494
:param kwargs: additional keyword arguments will
495495
be passed as options for the `create collection command`_
@@ -947,7 +947,7 @@ def cursor_command(
947947
read preference configured for the transaction.
948948
Otherwise, defaults to
949949
:attr:`~pymongo.read_preferences.ReadPreference.PRIMARY`.
950-
:param codec_options`: A :class:`~bson.codec_options.CodecOptions`
950+
:param codec_options: A :class:`~bson.codec_options.CodecOptions`
951951
instance.
952952
:param session: A
953953
:class:`~pymongo.client_session.ClientSession`.

pymongo/synchronous/encryption.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,10 +1003,10 @@ def delete_key(self, id: Binary) -> DeleteResult:
10031003
def add_key_alt_name(self, id: Binary, key_alt_name: str) -> Any:
10041004
"""Add ``key_alt_name`` to the set of alternate names in the key document with UUID ``key_id``.
10051005
1006-
:param `id`: The UUID of a key a which must be a
1006+
:param id: The UUID of a key a which must be a
10071007
:class:`~bson.binary.Binary` with subtype 4 (
10081008
:attr:`~bson.binary.UUID_SUBTYPE`).
1009-
:param `key_alt_name`: The key alternate name to add.
1009+
:param key_alt_name: The key alternate name to add.
10101010
10111011
:return: The previous version of the key document.
10121012
@@ -1035,10 +1035,10 @@ def remove_key_alt_name(self, id: Binary, key_alt_name: str) -> Optional[RawBSON
10351035
10361036
Also removes the ``keyAltNames`` field from the key document if it would otherwise be empty.
10371037
1038-
:param `id`: The UUID of a key a which must be a
1038+
:param id: The UUID of a key a which must be a
10391039
:class:`~bson.binary.Binary` with subtype 4 (
10401040
:attr:`~bson.binary.UUID_SUBTYPE`).
1041-
:param `key_alt_name`: The key alternate name to remove.
1041+
:param key_alt_name: The key alternate name to remove.
10421042
10431043
:return: Returns the previous version of the key document.
10441044
@@ -1077,7 +1077,7 @@ def rewrap_many_data_key(
10771077
:param filter: A document used to filter the data keys.
10781078
:param provider: The new KMS provider to use to encrypt the data keys,
10791079
or ``None`` to use the current KMS provider(s).
1080-
:param `master_key`: The master key fields corresponding to the new KMS
1080+
:param master_key: The master key fields corresponding to the new KMS
10811081
provider when ``provider`` is not ``None``.
10821082
10831083
:return: A :class:`RewrapManyDataKeyResult`.

0 commit comments

Comments
 (0)