Skip to content

Commit 26f7a9d

Browse files
authored
PYTHON-4524 Bump maxWireVersion for MongoDB 8.0 (mongodb#1720)
1 parent 5c7bc15 commit 26f7a9d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

pymongo/common.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@
6868
# What this version of PyMongo supports.
6969
MIN_SUPPORTED_SERVER_VERSION = "3.6"
7070
MIN_SUPPORTED_WIRE_VERSION = 6
71-
MAX_SUPPORTED_WIRE_VERSION = 21
71+
# MongoDB 8.0
72+
MAX_SUPPORTED_WIRE_VERSION = 25
7273

7374
# Frequency to call hello on servers, in seconds.
7475
HEARTBEAT_FREQUENCY = 10

test/test_topology.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -548,8 +548,8 @@ def test_wire_version(self):
548548
HelloCompat.LEGACY_CMD: True,
549549
"setName": "rs",
550550
"hosts": ["a"],
551-
"minWireVersion": 22,
552-
"maxWireVersion": 24,
551+
"minWireVersion": 26,
552+
"maxWireVersion": 27,
553553
},
554554
)
555555

@@ -559,7 +559,7 @@ def test_wire_version(self):
559559
# Error message should say which server failed and why.
560560
self.assertEqual(
561561
str(e),
562-
"Server at a:27017 requires wire version 22, but this version "
562+
"Server at a:27017 requires wire version 26, but this version "
563563
"of PyMongo only supports up to %d." % (common.MAX_SUPPORTED_WIRE_VERSION,),
564564
)
565565
else:

0 commit comments

Comments
 (0)