cubicweb/rset.py
changeset 12567 26744ad37953
parent 12566 6b3523f81f42
child 12931 6eae252361e5
--- a/cubicweb/rset.py	Fri Apr 05 17:21:14 2019 +0200
+++ b/cubicweb/rset.py	Fri Apr 05 17:58:19 2019 +0200
@@ -17,10 +17,6 @@
 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
 """The `ResultSet` class which is returned as result of an rql query"""
 
-
-from six import PY3, text_type
-from six.moves import range
-
 from logilab.common.decorators import cached, clear_cache, copy_cache
 from rql import nodes, stmts
 
@@ -366,13 +362,7 @@
         """return the result set's origin rql as a string, with arguments
         substitued
         """
-        encoding = self.req.encoding
-        rqlstr = self.syntax_tree().as_string(kwargs=self.args)
-        if PY3:
-            return rqlstr
-        if isinstance(rqlstr, text_type):
-            return rqlstr
-        return text_type(rqlstr, encoding)
+        return self.syntax_tree().as_string(kwargs=self.args)
 
     # client helper methods ###################################################