From 8f237e4a96b40f36ed20789485d9b13f917380f3 Mon Sep 17 00:00:00 2001 From: Casey Clements Date: Wed, 18 Jun 2025 14:39:53 -0400 Subject: [PATCH 1/2] Updated changelog to reflect breaking change in bson.binary.BinaryVector --- doc/changelog.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/changelog.rst b/doc/changelog.rst index ca4784f919..06c35de313 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -8,6 +8,9 @@ PyMongo 4.14 brings a number of changes including: - Added :attr:`bson.codec_options.TypeRegistry.codecs` and :attr:`bson.codec_options.TypeRegistry.fallback_encoder` properties to allow users to directly access the type codecs and fallback encoder for a given :class:`bson.codec_options.TypeRegistry`. +- Introduces a minor breaking change. When encoding :class:`bson.binary.BinaryVector`, a ValueError will be raised + if the 'padding' metadata field is < 0 or > 7, or non-zero for any type other than PACKED_BIT. + Changes in Version 4.13.2 (2025/06/17) -------------------------------------- From ada7506ba77401cd449da9e97fbb07ff0b8a4501 Mon Sep 17 00:00:00 2001 From: Casey Clements Date: Wed, 18 Jun 2025 14:43:23 -0400 Subject: [PATCH 2/2] Update doc/changelog.rst Co-authored-by: Steven Silvester --- doc/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog.rst b/doc/changelog.rst index 06c35de313..35a9770a14 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -8,7 +8,7 @@ PyMongo 4.14 brings a number of changes including: - Added :attr:`bson.codec_options.TypeRegistry.codecs` and :attr:`bson.codec_options.TypeRegistry.fallback_encoder` properties to allow users to directly access the type codecs and fallback encoder for a given :class:`bson.codec_options.TypeRegistry`. -- Introduces a minor breaking change. When encoding :class:`bson.binary.BinaryVector`, a ValueError will be raised +- Introduces a minor breaking change. When encoding :class:`bson.binary.BinaryVector`, a ``ValueError`` will be raised if the 'padding' metadata field is < 0 or > 7, or non-zero for any type other than PACKED_BIT. Changes in Version 4.13.2 (2025/06/17)