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:
13
13
14
14
- Introduces a minor breaking change. When encoding :class: `bson.binary.BinaryVector `, a ``ValueError `` will be raised
15
15
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 ``.
16
17
17
18
Changes in Version 4.13.2 (2025/06/17)
18
19
--------------------------------------
Original file line number Diff line number Diff line change @@ -80,6 +80,9 @@ async def parse_uri(
80
80
wait for a response from the DNS server.
81
81
:param srv_service_name: A custom SRV service name
82
82
83
+ .. versionchanged:: 4.14
84
+ ``options`` is now type ``dict`` as opposed to a ``_CaseInsensitiveDictionary``.
85
+
83
86
.. versionchanged:: 4.6
84
87
The delimiting slash (``/``) between hosts and connection options is now optional.
85
88
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(
80
80
wait for a response from the DNS server.
81
81
:param srv_service_name: A custom SRV service name
82
82
83
+ .. versionchanged:: 4.14
84
+ ``options`` is now type ``dict`` as opposed to a ``_CaseInsensitiveDictionary``.
85
+
83
86
.. versionchanged:: 4.6
84
87
The delimiting slash (``/``) between hosts and connection options is now optional.
85
88
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):
555
555
with self .assertRaisesRegex (ValueError , r"Port contains whitespace character: '\\n'" ):
556
556
parse_uri ("mongodb://localhost:27\n 017" )
557
557
558
+ def test_parse_uri_options_type (self ):
559
+ opts = parse_uri ("mongodb://localhost:27017" )["options" ]
560
+ self .assertIsInstance (opts , dict )
561
+
558
562
559
563
if __name__ == "__main__" :
560
564
unittest .main ()
You can’t perform that action at this time.
0 commit comments