Closed berkanteber closed 2 weeks ago
MultiDict behavior for nested dicts changed in 3.1.0. It's probably because of this commit: 0294d88b9c10fe079ecfe9e02129d52b1e95de54.
MultiDict
For dicts:
isinstance(value, (tuple, list)
False
isinstance(value, cabc.Collection) and not isinstance(value, str)
True
So, for d = {'foo': {'bar': {'baz'}}}:
d = {'foo': {'bar': {'baz'}}}
On Werkzug==3.0.4:
Werkzug==3.0.4
>>> MultiDict(d) MultiDict([('foo', {'bar': {'baz'}})]) >>> MultiDict(d).to_dict() == d {'foo': {'bar': {'baz'}}}
On Werkzeug==3.1.0 (and forward):
Werkzeug==3.1.0
>>> MultiDict(d) MultiDict([('foo', 'bar')]) >>> MultiDict(d).to_dict() == d {'foo': 'bar'}
On Python 3.11, but shouldn't be relevant.
Duplicate of #2994
MultiDict
behavior for nested dicts changed in 3.1.0. It's probably because of this commit: 0294d88b9c10fe079ecfe9e02129d52b1e95de54.For dicts:
isinstance(value, (tuple, list)
isFalse
isinstance(value, cabc.Collection) and not isinstance(value, str)
isTrue
So, for
d = {'foo': {'bar': {'baz'}}}
:On
Werkzug==3.0.4
:On
Werkzeug==3.1.0
(and forward):On Python 3.11, but shouldn't be relevant.