PYTHON-4524 Bump maxWireVersion for MongoDB 8.0 (#1720)

This commit is contained in:
Shane Harvey 2024-06-27 13:46:30 -07:00 committed by GitHub
parent 5c7bc15ca5
commit 26f7a9d2ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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: