﻿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
6772	`in` lookup type no longer works with tuples	jbronn	Malcolm Tredinnick	"When using a tuple parameter, instead of a list, the `in` lookup type will raise an exception:
{{{
>>> MyModel.objects.filter(name__in=['Foo', 'Bar'])
[<MyModel: Foo>, <MyModel: Bar>]
>>>Model.objects.filter(name__in=('Foo', 'Bar'))
Traceback (most recent call last):
  ...
  File ""/Users/jbronn/django/queryset-refactor/django/db/models/query.py"", line 28, in __repr__
    return repr(list(iter(self)))
  File ""/Users/jbronn/django/queryset-refactor/django/db/models/query.py"", line 46, in __iter__
    self._fill_cache()
  File ""/Users/jbronn/django/queryset-refactor/django/db/models/query.py"", line 446, in _fill_cache
    self._result_cache.append(self._iter.next())
  File ""/Users/jbronn/django/queryset-refactor/django/db/models/query.py"", line 127, in iterator
    for row in self.query.results_iter():
  File ""/Users/jbronn/django/queryset-refactor/django/db/models/sql/query.py"", line 163, in results_iter
    for rows in self.execute_sql(MULTI):
  File ""/Users/jbronn/django/queryset-refactor/django/db/models/sql/query.py"", line 1301, in execute_sql
    cursor.execute(sql, params)
  File ""/Users/jbronn/django/queryset-refactor/django/db/backends/util.py"", line 18, in execute
    return self.cursor.execute(sql, params)
ProgrammingError: syntax error at or near ""Foo""
LINE 1: ....""name"" FROM ""tmp_mymodel"" WHERE ""tmp_mymodel"".""name"" IN Foo
}}}

I believe changes in r7170 to  [http://code.djangoproject.com/browser/django/branches/queryset-refactor/django/db/models/sql/where.py?rev=7170#L109 where.py] are causing the problem.
"		new	Database layer (models, ORM)	queryset-refactor			qs-rf in lookup	jbronn	Unreviewed	0	0	0	0	0	0
