diff --git a/pymongo/common.py b/pymongo/common.py index ea349b3d23..7ab4b64d2c 100644 --- a/pymongo/common.py +++ b/pymongo/common.py @@ -69,8 +69,8 @@ # What this version of PyMongo supports. MIN_SUPPORTED_SERVER_VERSION = "4.2" MIN_SUPPORTED_WIRE_VERSION = 8 -# MongoDB 8.0 -MAX_SUPPORTED_WIRE_VERSION = 25 +# MongoDB 9.0 +MAX_SUPPORTED_WIRE_VERSION = 29 # Frequency to call hello on servers, in seconds. HEARTBEAT_FREQUENCY = 10 diff --git a/test/test_topology.py b/test/test_topology.py index c87c48819e..83e269560f 100644 --- a/test/test_topology.py +++ b/test/test_topology.py @@ -593,8 +593,8 @@ def test_wire_version(self): HelloCompat.LEGACY_CMD: True, "setName": "rs", "hosts": ["a"], - "minWireVersion": 26, - "maxWireVersion": 27, + "minWireVersion": common.MAX_SUPPORTED_WIRE_VERSION + 1, + "maxWireVersion": common.MAX_SUPPORTED_WIRE_VERSION + 2, }, ) @@ -604,8 +604,9 @@ def test_wire_version(self): # Error message should say which server failed and why. self.assertEqual( str(e), - "Server at a:27017 requires wire version 26, but this version " - "of PyMongo only supports up to %d." % (common.MAX_SUPPORTED_WIRE_VERSION,), + "Server at a:27017 requires wire version %d, but this version " + "of PyMongo only supports up to %d." + % (common.MAX_SUPPORTED_WIRE_VERSION + 1, common.MAX_SUPPORTED_WIRE_VERSION), ) else: self.fail("No error with incompatible wire version")