From f7225fda55df81265c3284b2b159a610eb390539 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 12 Apr 2023 10:40:44 -0500 Subject: [PATCH] PYTHON-3652 Bump maxWireVersion for MongoDB 7.0 (#1188) --- pymongo/common.py | 2 +- test/test_topology.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pymongo/common.py b/pymongo/common.py index add70cfb5..707cf5d23 100644 --- a/pymongo/common.py +++ b/pymongo/common.py @@ -63,7 +63,7 @@ MAX_WRITE_BATCH_SIZE = 1000 # What this version of PyMongo supports. MIN_SUPPORTED_SERVER_VERSION = "3.6" MIN_SUPPORTED_WIRE_VERSION = 6 -MAX_SUPPORTED_WIRE_VERSION = 17 +MAX_SUPPORTED_WIRE_VERSION = 21 # Frequency to call hello on servers, in seconds. HEARTBEAT_FREQUENCY = 10 diff --git a/test/test_topology.py b/test/test_topology.py index d7bae9229..e09d7c369 100644 --- a/test/test_topology.py +++ b/test/test_topology.py @@ -540,8 +540,8 @@ class TestMultiServerTopology(TopologyTest): HelloCompat.LEGACY_CMD: True, "setName": "rs", "hosts": ["a"], - "minWireVersion": 21, - "maxWireVersion": 22, + "minWireVersion": 22, + "maxWireVersion": 24, }, ) @@ -551,7 +551,7 @@ class TestMultiServerTopology(TopologyTest): # Error message should say which server failed and why. self.assertEqual( str(e), - "Server at a:27017 requires wire version 21, but this version " + "Server at a:27017 requires wire version 22, but this version " "of PyMongo only supports up to %d." % (common.MAX_SUPPORTED_WIRE_VERSION,), ) else: