Skip to content

Commit fb6c5f1

Browse files
committed
Merge branch 'master' of github.com:mongodb/mongo-python-driver
2 parents 6cb8a97 + da03da3 commit fb6c5f1

File tree

47 files changed

+113
-61
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+113
-61
lines changed

doc/changelog.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,22 @@ Changes in Version 4.8.0
66

77
.. warning:: PyMongo 4.8 drops support for Python 3.7 and PyPy 3.8: Python 3.8+ or PyPy 3.9+ is now required.
88

9+
Changes in Version 4.7.2
10+
-------------------------
11+
12+
Version 4.7.2 fixes a bug introduced in 4.7.0:
13+
14+
- Fixed a bug where PyMongo could not be used with the Nuitka compiler.
15+
16+
Issues Resolved
17+
...............
18+
19+
See the `PyMongo 4.7.2 release notes in JIRA`_ for the list of resolved issues
20+
in this release.
21+
22+
.. _PyMongo 4.7.2 release notes in JIRA: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=39710
23+
24+
925
Changes in Version 4.7.1
1026
-------------------------
1127

test/auth/unified/mongodb-oidc-no-retry.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
{
66
"minServerVersion": "7.0",
77
"auth": true,
8-
"authMechanism": "MONGODB-OIDC"
8+
"authMechanism": "MONGODB-OIDC",
9+
"serverless": "forbid"
910
}
1011
],
1112
"createEntities": [

test/auth_oidc/test_auth_oidc.py

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -824,30 +824,21 @@ def fetch(self, a):
824824
# Close the client.
825825
client.close()
826826

827-
def test_2_4_oidc_callback_returns_invalid_data(self):
828-
# Create a MongoClient configured with an OIDC callback that returns data not conforming to the OIDCCredential with extra fields.
829-
class CustomCallback(OIDCCallback):
830-
count = 0
831-
832-
def fetch(self, a):
833-
self.count += 1
834-
return OIDCCallbackResult(access_token="bad value")
835-
836-
client = self.create_client(request_cb=CustomCallback())
837-
# Perform a ``find`` operation that fails.
838-
with self.assertRaises(OperationFailure):
839-
client.test.test.find_one()
840-
# Close the client.
841-
client.close()
842-
843-
def test_2_5_invalid_client_configuration_with_callback(self):
827+
def test_2_4_invalid_client_configuration_with_callback(self):
844828
# Create a MongoClient configured with an OIDC callback and auth mechanism property ENVIRONMENT:test.
845829
request_cb = self.create_request_cb()
846830
props: Dict = {"OIDC_CALLBACK": request_cb, "ENVIRONMENT": "test"}
847831
# Assert it returns a client configuration error.
848832
with self.assertRaises(ConfigurationError):
849833
self.create_client(authmechanismproperties=props)
850834

835+
def test_2_5_invalid_use_of_ALLOWED_HOSTS(self):
836+
# Create an OIDC configured client with auth mechanism properties `{"ENVIRONMENT": "azure", "ALLOWED_HOSTS": []}`.
837+
props: Dict = {"ENVIRONMENT": "azure", "ALLOWED_HOSTS": []}
838+
# Assert it returns a client configuration error.
839+
with self.assertRaises(ConfigurationError):
840+
self.create_client(authmechanismproperties=props)
841+
851842
def test_3_1_authentication_failure_with_cached_tokens_fetch_a_new_token_and_retry(self):
852843
# Create a MongoClient and an OIDC callback that implements the provider logic.
853844
client = self.create_client()

test/client-side-encryption/spec/legacy/fle2v2-Range-Date-Aggregate.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"replicaset",
77
"sharded",
88
"load-balanced"
9-
]
9+
],
10+
"maxServerVersion": "7.99.99"
1011
}
1112
],
1213
"database_name": "default",

test/client-side-encryption/spec/legacy/fle2v2-Range-Date-Correctness.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"replicaset",
77
"sharded",
88
"load-balanced"
9-
]
9+
],
10+
"maxServerVersion": "7.99.99"
1011
}
1112
],
1213
"database_name": "default",

test/client-side-encryption/spec/legacy/fle2v2-Range-Date-Delete.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"replicaset",
77
"sharded",
88
"load-balanced"
9-
]
9+
],
10+
"maxServerVersion": "7.99.99"
1011
}
1112
],
1213
"database_name": "default",

test/client-side-encryption/spec/legacy/fle2v2-Range-Date-FindOneAndUpdate.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"replicaset",
77
"sharded",
88
"load-balanced"
9-
]
9+
],
10+
"maxServerVersion": "7.99.99"
1011
}
1112
],
1213
"database_name": "default",

test/client-side-encryption/spec/legacy/fle2v2-Range-Date-InsertFind.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"replicaset",
77
"sharded",
88
"load-balanced"
9-
]
9+
],
10+
"maxServerVersion": "7.99.99"
1011
}
1112
],
1213
"database_name": "default",

test/client-side-encryption/spec/legacy/fle2v2-Range-Date-Update.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"replicaset",
77
"sharded",
88
"load-balanced"
9-
]
9+
],
10+
"maxServerVersion": "7.99.99"
1011
}
1112
],
1213
"database_name": "default",

test/client-side-encryption/spec/legacy/fle2v2-Range-Decimal-Aggregate.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"minServerVersion": "7.0.0",
55
"topology": [
66
"replicaset"
7-
]
7+
],
8+
"maxServerVersion": "7.99.99"
89
}
910
],
1011
"database_name": "default",

0 commit comments

Comments
 (0)