--- a/rset.py Wed Apr 22 09:52:28 2015 +0200
+++ b/rset.py Sun Jul 27 14:57:51 2014 +0200
@@ -21,13 +21,16 @@
from warnings import warn
+from logilab.common import nullobject
from logilab.common.decorators import cached, clear_cache, copy_cache
-
from rql import nodes, stmts
from cubicweb import NotAnEntity, NoResultError, MultipleResultsError
+_MARKER = nullobject()
+
+
class ResultSet(object):
"""A result set wraps a RQL query result. This object implements
partially the list protocol to allow direct use as a list of
@@ -362,10 +365,12 @@
rset.limited = (limit, offset)
return rset
- def printable_rql(self, encoded=False):
+ def printable_rql(self, encoded=_MARKER):
"""return the result set's origin rql as a string, with arguments
substitued
"""
+ 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)
# sounds like we get encoded or unicode string due to a bug in as_string