# HG changeset patch # User julien tayon # Date 1559633747 -7200 # Node ID 8466a6dd474e7651f8cad145e32d837b333ff7bf # Parent 234ca3cbbb4632da9be295b5eeb717f5bb1c7f00 [py3] changing unicode to str py2 support being dropped, passing the code in full py3 str/bytes syntax diff -r 234ca3cbbb46 -r 8466a6dd474e cubicweb/web/schemaviewer.py --- a/cubicweb/web/schemaviewer.py Tue Jun 11 09:07:24 2019 +0200 +++ b/cubicweb/web/schemaviewer.py Tue Jun 04 09:35:47 2019 +0200 @@ -42,7 +42,7 @@ self._ = req._ else: encoding = 'ascii' - self._ = unicode + self._ = str self.encoding = encoding # no self.req managements @@ -239,6 +239,6 @@ def to_string(self, value): """used to converte arbitrary values to encoded string""" - if isinstance(value, unicode): + if isinstance(value, str): return value.encode(self.encoding, 'replace') return str(value)