web/component.py
changeset 10713 ec0f96cd7a18
parent 10702 f94c812c3669
child 10903 da30851f9706
--- a/web/component.py	Mon Sep 21 19:00:26 2015 +0200
+++ b/web/component.py	Fri Sep 18 17:58:30 2015 +0200
@@ -24,7 +24,7 @@
 
 from warnings import warn
 
-from six import add_metaclass
+from six import PY3, add_metaclass, text_type
 
 from logilab.common.deprecation import class_deprecated, class_renamed, deprecated
 from logilab.mtconverter import xml_escape
@@ -217,6 +217,9 @@
     def __unicode__(self):
         return tags.a(self.label, href=self.href, **self.attrs)
 
+    if PY3:
+        __str__ = __unicode__
+
     def render(self, w):
         w(tags.a(self.label, href=self.href, **self.attrs))