﻿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
36934	BuiltinLookup.as_sql breaks with params-as-a-tuple	Stefan Bühler	Jacob Walls	"Hi,

`BuiltinLookup` violates the new policy and returns a list of params from `process_lhs` and expects a list in `as_sql` (uses `.extend`).

Lookup classes that inherit from (or mixed into) `BuiltinLookup` and overwrite `process_lhs` in a way that doesn't return a list of params (e.g. calling `Col.as_sql` through `compiler.compile(self.lhs)` are broken.

Example: django-netfields: https://github.com/jimfunk/django-postgresql-netfields/blob/f7529f2c97995dbc5b27ea7abcf0f2966269fd96/netfields/lookups.py#L27-L59

The new policy: https://docs.djangoproject.com/en/6.0/releases/6.0/#custom-orm-expressions-should-return-params-as-a-tuple

https://github.com/django/django/pull/20005 looks like it should fix this, and should be packported."	Bug	closed	Database layer (models, ORM)	6.0	Release blocker	fixed			Ready for checkin	1	0	0	0	0	0
