-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Milestone
Description
Since version 3.1.0, when I create a MultiDict with a bytes value as input it stores the bytes value in the MultiDict as a list of integer values. Prior to 3.1.0, this would preserve the bytes value in the MultiDict.
To reproduce, run this snippet with werkzeug installed:
from werkzeug.datastructures import MultiDict
multi_dict = MultiDict({
'bytes_value': b'abc',
'str_value': 'abc'
})
print(multi_dict)Running the above on version 3.1.0 prints:
MultiDict([('bytes_value', 97), ('bytes_value', 98), ('bytes_value', 99), ('str_value', 'abc')])
Running the snippet with version 3.0.6 prints:
MultiDict([('bytes_value', b'abc'), ('str_value', 'abc')])
I expected the behaviour from 3.0.6 to be preserved in this case
Environment:
- Python version: 3.11
- Werkzeug version: >= 3.1.0
Metadata
Metadata
Assignees
Labels
No labels