﻿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
25218	python_2_unicode_compatible causes infinite recursion when super().__str__() is called	Josh Crompton	nobody	"I have a class `A` which implements `__str__()` and is decorated with `@python_2_unicode_compatible`.

I have sub-class of `A`, `B`, and `B` 's implementation of `__str__()` calls `super().__str__()`.

When I call `b.__str__()`, I get the following error: `RuntimeError: maximum recursion depth exceeded while calling a Python object`.

Partial traceback:

{{{#!python
  File ""/home/josh/Desktop/temp/djtest/local/lib/python2.7/site-packages/django/utils/encoding.py"", line 42, in <lambda>
    klass.__str__ = lambda self: self.__unicode__().encode('utf-8')
  File ""recursion.py"", line 27, in __str__
    super().__str__(),
  File ""/home/josh/Desktop/temp/djtest/local/lib/python2.7/site-packages/django/utils/encoding.py"", line 42, in <lambda>
    klass.__str__ = lambda self: self.__unicode__().encode('utf-8')
  File ""recursion.py"", line 27, in __str__
    super().__str__(),
}}}

The docs (https://docs.djangoproject.com/en/dev/ref/utils/#django.utils.encoding.python_2_unicode_compatible) imply that the decorator should be applied to *any* class implementing `__str__()` "	Uncategorized	closed	Utilities	1.8	Normal	wontfix		tzanke@…	Unreviewed	0	0	0	0	0	0
