File tree Expand file tree Collapse file tree 4 files changed +11
-0
lines changed Expand file tree Collapse file tree 4 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ PyMongo 4.14 brings a number of changes including:
1313
1414- Introduces a minor breaking change. When encoding :class: `bson.binary.BinaryVector `, a ``ValueError `` will be raised
1515 if the 'padding' metadata field is < 0 or > 7, or non-zero for any type other than PACKED_BIT.
16+ - Changed :meth: `~pymongo.uri_parser.parse_uri `'s ``options `` parameter to be type ``dict `` instead of ``_CaseInsensitiveDictionary ``.
1617
1718Changes in Version 4.13.2 (2025/06/17)
1819--------------------------------------
Original file line number Diff line number Diff line change @@ -80,6 +80,9 @@ async def parse_uri(
8080 wait for a response from the DNS server.
8181 :param srv_service_name: A custom SRV service name
8282
83+ .. versionchanged:: 4.14
84+ ``options`` is now type ``dict`` as opposed to a ``_CaseInsensitiveDictionary``.
85+
8386 .. versionchanged:: 4.6
8487 The delimiting slash (``/``) between hosts and connection options is now optional.
8588 For example, "mongodb://example.com?tls=true" is now a valid URI.
Original file line number Diff line number Diff line change @@ -80,6 +80,9 @@ def parse_uri(
8080 wait for a response from the DNS server.
8181 :param srv_service_name: A custom SRV service name
8282
83+ .. versionchanged:: 4.14
84+ ``options`` is now type ``dict`` as opposed to a ``_CaseInsensitiveDictionary``.
85+
8386 .. versionchanged:: 4.6
8487 The delimiting slash (``/``) between hosts and connection options is now optional.
8588 For example, "mongodb://example.com?tls=true" is now a valid URI.
Original file line number Diff line number Diff line change @@ -555,6 +555,10 @@ def test_port_with_whitespace(self):
555555 with self .assertRaisesRegex (ValueError , r"Port contains whitespace character: '\\n'" ):
556556 parse_uri ("mongodb://localhost:27\n 017" )
557557
558+ def test_parse_uri_options_type (self ):
559+ opts = parse_uri ("mongodb://localhost:27017" )["options" ]
560+ self .assertIsInstance (opts , dict )
561+
558562
559563if __name__ == "__main__" :
560564 unittest .main ()
You can’t perform that action at this time.
0 commit comments