diff --git a/pymongo/common.py b/pymongo/common.py index 2ef9fa92f..a073eba57 100644 --- a/pymongo/common.py +++ b/pymongo/common.py @@ -68,7 +68,8 @@ 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 = 21 +# MongoDB 8.0 +MAX_SUPPORTED_WIRE_VERSION = 25 # Frequency to call hello on servers, in seconds. HEARTBEAT_FREQUENCY = 10 diff --git a/test/test_topology.py b/test/test_topology.py index 8f7fde981..3725bab93 100644 --- a/test/test_topology.py +++ b/test/test_topology.py @@ -548,8 +548,8 @@ class TestMultiServerTopology(TopologyTest): HelloCompat.LEGACY_CMD: True, "setName": "rs", "hosts": ["a"], - "minWireVersion": 22, - "maxWireVersion": 24, + "minWireVersion": 26, + "maxWireVersion": 27, }, ) @@ -559,7 +559,7 @@ class TestMultiServerTopology(TopologyTest): # Error message should say which server failed and why. self.assertEqual( str(e), - "Server at a:27017 requires wire version 22, but this version " + "Server at a:27017 requires wire version 26, but this version " "of PyMongo only supports up to %d." % (common.MAX_SUPPORTED_WIRE_VERSION,), ) else: