Skip to content

Commit 8b53530

Browse files
authored
PYTHON-5792: Bump maxWireVersion to 29 (#2849)
1 parent 27f90ff commit 8b53530

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

pymongo/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@
6969
# What this version of PyMongo supports.
7070
MIN_SUPPORTED_SERVER_VERSION = "4.2"
7171
MIN_SUPPORTED_WIRE_VERSION = 8
72-
# MongoDB 8.0
73-
MAX_SUPPORTED_WIRE_VERSION = 25
72+
# MongoDB 9.0
73+
MAX_SUPPORTED_WIRE_VERSION = 29
7474

7575
# Frequency to call hello on servers, in seconds.
7676
HEARTBEAT_FREQUENCY = 10

test/test_topology.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -593,8 +593,8 @@ def test_wire_version(self):
593593
HelloCompat.LEGACY_CMD: True,
594594
"setName": "rs",
595595
"hosts": ["a"],
596-
"minWireVersion": 26,
597-
"maxWireVersion": 27,
596+
"minWireVersion": common.MAX_SUPPORTED_WIRE_VERSION + 1,
597+
"maxWireVersion": common.MAX_SUPPORTED_WIRE_VERSION + 2,
598598
},
599599
)
600600

@@ -604,8 +604,9 @@ def test_wire_version(self):
604604
# Error message should say which server failed and why.
605605
self.assertEqual(
606606
str(e),
607-
"Server at a:27017 requires wire version 26, but this version "
608-
"of PyMongo only supports up to %d." % (common.MAX_SUPPORTED_WIRE_VERSION,),
607+
"Server at a:27017 requires wire version %d, but this version "
608+
"of PyMongo only supports up to %d."
609+
% (common.MAX_SUPPORTED_WIRE_VERSION + 1, common.MAX_SUPPORTED_WIRE_VERSION),
609610
)
610611
else:
611612
self.fail("No error with incompatible wire version")

0 commit comments

Comments
 (0)