﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
30485	Unexpected behavior for django.utils.http.urlencode	Johan Lübcke	nobody	"The function django.utils.http.urlencode has been changed to give unexpected result for tuple values (and other iterable objects) in the case when no iterations is expected:
{{{
>>> django.utils.http.urlencode(dict(a=('a','b')), doseq=False)
'a=%5B%27a%27%2C+%27b%27%5D'
}}}

One would expect the same as the standard library version (Note the first and last characters has been replaced by square brackets):
{{{
>>> urllib.parse.urlencode(dict(a=('a', 'b')), doseq=False)
'a=%28%27a%27%2C+%27b%27%29'
}}}

If the value is a list, the result if what one would expect:
{{{
>>> django.utils.http.urlencode(dict(a=['a','b']), doseq=False)
'a=%5B%27a%27%2C+%27b%27%5D'
>>> urllib.parse.urlencode(dict(a=['a', 'b']), doseq=False)
'a=%5B%27a%27%2C+%27b%27%5D'
}}}

Note: This is a problem when one has objects that has a `__str__` method defined, returning the value one would want to be in the urlencode result, but the object by coincidence is also iterable."	Bug	closed	Core (Other)	2.2	Normal	fixed		François Freitag	Ready for checkin	1	0	0	0	0	0
