Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e8d8612ad | ||
|
|
aab9bcb4e1 | ||
|
|
724dee8e11 | ||
|
|
61dca84cd4 | ||
|
|
fb7e522316 | ||
|
|
c7432db957 | ||
|
|
32b2b32780 | ||
|
|
8212683a13 |
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
@ -1,2 +0,0 @@
|
||||
# Global owner for repo
|
||||
* @blink1073 @NoahStapp @ShaneHarvey
|
||||
@ -469,7 +469,9 @@ static int _load_python_objects(PyObject* module) {
|
||||
struct module_state *state = GETSTATE(module);
|
||||
|
||||
/* Python str for faster _type_marker check */
|
||||
state->_type_marker_str = PyUnicode_FromString("_type_marker");
|
||||
if (!(state->_type_marker_str = PyUnicode_FromString("_type_marker"))) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (_load_object(&state->Binary, "bson.binary", "Binary") ||
|
||||
_load_object(&state->Code, "bson.code", "Code") ||
|
||||
@ -3043,6 +3045,7 @@ static int _cbson_traverse(PyObject *m, visitproc visit, void *arg) {
|
||||
Py_VISIT(GETSTATE(m)->MaxKey);
|
||||
Py_VISIT(GETSTATE(m)->UTC);
|
||||
Py_VISIT(GETSTATE(m)->REType);
|
||||
Py_VISIT(GETSTATE(m)->_type_marker_str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,27 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
Changes in Version 4.4.1
|
||||
------------------------
|
||||
|
||||
Version 4.4.1 fixes the following bugs:
|
||||
|
||||
- Fixed a bug where pymongo would raise a ``ConfigurationError: Invalid SRV host``
|
||||
error when connecting to a "mongodb+srv://" URI that included capital letters
|
||||
in the SRV hosts returned from DNS. (`PYTHON-3800`_).
|
||||
- Fixed a minor reference counting bug in the C extension (`PYTHON-3798`_).
|
||||
|
||||
Issues Resolved
|
||||
...............
|
||||
|
||||
See the `PyMongo 4.4.1 release notes in JIRA`_ for the list of resolved issues
|
||||
in this release.
|
||||
|
||||
.. _PYTHON-3798: https://jira.mongodb.org/browse/PYTHON-3798
|
||||
.. _PYTHON-3800: https://jira.mongodb.org/browse/PYTHON-3800
|
||||
.. _PyMongo 4.4.1 release notes in JIRA: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=36329
|
||||
|
||||
|
||||
Changes in Version 4.4
|
||||
-----------------------
|
||||
|
||||
|
||||
@ -633,6 +633,12 @@ as demonstrated by the following example::
|
||||
)
|
||||
key_vault = key_vault_client["keyvault"]["datakeys"]
|
||||
key_vault.drop()
|
||||
# Ensure that two data keys cannot share the same keyAltName.
|
||||
key_vault.create_index(
|
||||
"keyAltNames",
|
||||
unique=True,
|
||||
partialFilterExpression={"keyAltNames": {"$exists": True}},
|
||||
)
|
||||
key1_id = client_encryption.create_data_key("local", key_alt_names=["firstName"])
|
||||
key2_id = client_encryption.create_data_key("local", key_alt_names=["lastName"])
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
"""Current version of PyMongo."""
|
||||
from typing import Tuple, Union
|
||||
|
||||
version_tuple: Tuple[Union[int, str], ...] = (4, 4, 0)
|
||||
version_tuple: Tuple[Union[int, str], ...] = (4, 4, 2, ".dev0")
|
||||
|
||||
|
||||
def get_version_string() -> str:
|
||||
|
||||
@ -108,7 +108,7 @@ class _SrvResolver:
|
||||
# Validate hosts
|
||||
for node in nodes:
|
||||
try:
|
||||
nlist = node[0].split(".")[1:][-self.__slen :]
|
||||
nlist = node[0].lower().split(".")[1:][-self.__slen :]
|
||||
except Exception:
|
||||
raise ConfigurationError(f"Invalid SRV host: {node[0]}")
|
||||
if self.__plist != nlist:
|
||||
|
||||
@ -21,7 +21,7 @@ import sys
|
||||
|
||||
sys.path[0:0] = [""]
|
||||
|
||||
from test import client_context, unittest
|
||||
from test import IntegrationTest, client_context, unittest
|
||||
from test.utils import wait_until
|
||||
|
||||
from pymongo.common import validate_read_preference_tags
|
||||
@ -186,5 +186,13 @@ class TestParsingErrors(unittest.TestCase):
|
||||
)
|
||||
|
||||
|
||||
class TestCaseInsensitive(IntegrationTest):
|
||||
@unittest.skipUnless(_HAVE_DNSPYTHON, "DNS tests require the dnspython module")
|
||||
def test_connect_case_insensitive(self):
|
||||
client = MongoClient("mongodb+srv://TEST1.TEST.BUILD.10GEN.cc/")
|
||||
self.addCleanup(client.close)
|
||||
self.assertGreater(len(client.topology_description.server_descriptions()), 1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user