#29627 closed Bug (fixed)
QueryDict.urlencode() crashes on non-string values
Reported by: | Rafał P. | Owned by: | nobody |
---|---|---|---|
Component: | HTTP handling | Version: | 2.1 |
Severity: | Release blocker | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In version 2.0 it was possible to pass integer values to QueryDict and urlencode() it:
from django.http import QueryDict d = QueryDict('', mutable=True) d["a"] = 1 d.urlencode() 'a=1'
in 2.1 it raises AttributeError: 'int' object has no attribute 'encode'
. I think this should be listed as backward - incompatible change in the Release Notes.
Change History (4)
comment:1 by , 6 years ago
Component: | Uncategorized → HTTP handling |
---|---|
Severity: | Normal → Release blocker |
Summary: | QueryDict.urlencode() behaviour changed → QueryDict.urlencode() crashes on non-string values |
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Bug |
Note:
See TracTickets
for help on using tickets.
Bisected to 7d96f0c49ab750799860e42716d7105e11de44de. We might restore the old behavior.