﻿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
27521	QueryDict is inconsistently converted to kwargs between CPython and PyPy	Mark Heppner	nobody	"{{{
from django.conf import settings
settings.configure()
from django.http.request import QueryDict
q = QueryDict('foo=bar&foo=baz')

def test(**kwargs):
    print(kwargs)

test(**q)
}}}

In CPython 2.7, 3.4, and 3.5, this prints out `{u'foo': [u'bar', u'baz']}`, with the value being set to a list. In PyPy 5.4 (2.7.10) and 5.6 (2.7.12), the value comes back as a single string, always picking the last item `{u'foo': u'baz'}`. To clarify, the instance of `QueryDict` is the same between the two, they both show the value as a list; it's only different when converting to kwargs. From what I can tell, this inconsistent behavior is present in Django 1.8, 1.9, and 1.10.

In PyPy, this can be fixed by first casting to a `dict`:
{{{
> test(**dict(q))
{u'foo': [u'bar', u'baz']}
}}}"	Bug	closed	Core (Other)	1.10	Normal	needsinfo	PyPy QueryDict MultiValueDict		Unreviewed	0	0	0	0	0	0
