﻿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
20222	Some functions are wrapped into allow_lazy incorrectly	Alexey Boriskin	Baptiste Mispelon	"allow_lazy() requires more than one argument. Second and further arguments must be types. 
There are a few functions which are wrapped into allow_lazy without *resultclasses specified.
Namely:
* django.utils.html.strip_tags
* django.utils.text.Truncator.chars
* django.utils.text.Truncator.words
* django.utils.text.recapitalize
* django.utils.text.phone2numeric
* django.utils.text.unescape_string_literal

IPython session, which demonstrates code broken because of that:
{{{
In [1]: from django.utils.functional import lazy
In [2]: from django.utils.encoding import force_text
In [3]: from django.utils import six
In [4]: from django.utils.html import strip_tags
In [5]: promise = lazy(lambda:u'hello', six.text_type)()
In [6]: force_text(promise)
Out[6]: u'hello'
In [7]: promise = lazy(lambda:u'hello', six.text_type)()
In [8]: stripped = strip_tags(promise)
In [9]: force_text(stripped)
Out[9]: u'<django.utils.functional.__proxy__ object at 0x101f6ca50>'
}}}
"	Bug	closed	Utilities	dev	Normal	fixed		bmispelon@…	Accepted	1	0	0	1	0	0
