[pkg] Require cubicweb >= 3.25.4
authorDenis Laxalde <denis@laxalde.org>
Tue, 06 Feb 2018 08:56:33 +0100
changeset 2935 d06b9c2459cb
parent 2931 2929e483c48a
child 2936 e611c3939f24
[pkg] Require cubicweb >= 3.25.4 And drop monkeypatch now in this version.
cubicweb_seda/__pkginfo__.py
cubicweb_seda/site_cubicweb.py
--- a/cubicweb_seda/__pkginfo__.py	Tue Dec 19 17:10:44 2017 +0100
+++ b/cubicweb_seda/__pkginfo__.py	Tue Feb 06 08:56:33 2018 +0100
@@ -14,7 +14,7 @@
 web = 'http://www.cubicweb.org/project/%s' % distname
 
 __depends__ = {
-    'cubicweb': '>= 3.25.3, < 3.26',
+    'cubicweb': '>= 3.25.4, < 3.26',
     'six': '>= 1.4.0',
     'cubicweb-eac': None,
     'cubicweb-skos': '>= 0.12.1',
--- a/cubicweb_seda/site_cubicweb.py	Tue Dec 19 17:10:44 2017 +0100
+++ b/cubicweb_seda/site_cubicweb.py	Tue Feb 06 08:56:33 2018 +0100
@@ -14,28 +14,9 @@
 # You should have received a copy of the GNU Lesser General Public License along
 # with this program. If not, see <http://www.gnu.org/licenses/>.
 
-from logilab.common.decorators import monkeypatch
-
 from cubicweb.entity import Entity
-from cubicweb.rqlrewrite import RQLRelationRewriter
-from cubicweb.server import ssplanner
 
 Entity.cw_skip_copy_for.append(('container', 'subject'))
 Entity.cw_skip_copy_for.append(('container', 'object'))
 Entity.cw_skip_copy_for.append(('clone_of', 'subject'))
 Entity.cw_skip_copy_for.append(('clone_of', 'object'))
-
-
-# monkey-patch to allow using computed relation in WHERE clause of write queries
-# (https://www.cubicweb.org/ticket/17113286)
-
-@monkeypatch(ssplanner.SSPlanner)
-def _select_plan(self, plan, select, solutions):
-    union = ssplanner.Union()
-    union.append(select)
-    select.clean_solutions(solutions)
-    ssplanner.add_types_restriction(self.schema, select)
-    rewriter = RQLRelationRewriter(plan.cnx)
-    rewriter.rewrite(union, plan.args)
-    self.rqlhelper.annotate(union)
-    return self.build_select_plan(plan, union)