﻿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
30487	Using more than 245 functions in CombinedExpressions causes RecursionError.	M1ha Shvn	nobody	"Hi.
When I try to concatenate more than 245 values into django.db.models.expressions.CombinedExpression I get RecursionError ""RecursionError: maximum recursion depth exceeded"".

A simple example to reproduce:

{{{
from django.db.models import F
item = F('test')
for i in range(300):
    item += F('test')
print(item)
}}}
returns

{{{
Traceback (most recent call last):
  File ""/usr/lib/python3.7/code.py"", line 90, in runcode
    exec(code, self.locals)
  File ""<input>"", line 5, in <module>
  File ""/home/vagrant/venv/lib/python3.7/site-packages/django/db/models/expressions.py"", line 404, in __str__
    return ""{} {} {}"".format(self.lhs, self.connector, self.rhs)
  File ""/home/vagrant/venv/lib/python3.7/site-packages/django/db/models/expressions.py"", line 404, in __str__
    return ""{} {} {}"".format(self.lhs, self.connector, self.rhs)
  File ""/home/vagrant/venv/lib/python3.7/site-packages/django/db/models/expressions.py"", line 404, in __str__
    return ""{} {} {}"".format(self.lhs, self.connector, self.rhs)
  [Previous line repeated 244 more times]
RecursionError: maximum recursion depth exceeded
}}}

"	Bug	closed	Database layer (models, ORM)	dev	Normal	wontfix	recursion function Func		Unreviewed	0	0	0	0	0	0
