Don't pass an encoding to rqlst.as_string()
authorJulien Cristau <julien.cristau@logilab.fr>
Mon, 01 Dec 2014 16:50:41 +0100
changeset 10314 8f3783dc6358
parent 10313 ae9e23cf8790
child 10315 0f3489d622ba
Don't pass an encoding to rqlst.as_string()
rset.py
server/ssplanner.py
--- a/rset.py	Sun Jul 27 14:57:51 2014 +0200
+++ b/rset.py	Mon Dec 01 16:50:41 2014 +0100
@@ -372,7 +372,7 @@
         if encoded is not _MARKER:
             warn('[3.21] the "encoded" argument is deprecated', DeprecationWarning)
         encoding = self.req.encoding
-        rqlstr = self.syntax_tree().as_string(encoding, self.args)
+        rqlstr = self.syntax_tree().as_string(kwargs=self.args)
         # sounds like we get encoded or unicode string due to a bug in as_string
         if not encoded:
             if isinstance(rqlstr, unicode):
--- a/server/ssplanner.py	Sun Jul 27 14:57:51 2014 +0200
+++ b/server/ssplanner.py	Mon Dec 01 16:50:41 2014 +0100
@@ -249,7 +249,7 @@
                 raise QueryError('can not assign to %r relation'
                                  % relation.r_type)
             lhs, rhs = relation.get_variable_parts()
-            lhskey = lhs.as_string('utf-8')
+            lhskey = lhs.as_string()
             if not lhskey in selectedidx:
                 if lhs.variable in eidconsts:
                     eid = eidconsts[lhs.variable]
@@ -262,7 +262,7 @@
                 selectedidx[lhskey] = lhsinfo
             else:
                 lhsinfo = selectedidx[lhskey][:-1] + (None,)
-            rhskey = rhs.as_string('utf-8')
+            rhskey = rhs.as_string()
             if not rhskey in selectedidx:
                 if isinstance(rhs, Constant):
                     rhsinfo = (_CONSTANT, rhs.eval(plan.args), residx)