# HG changeset patch
# User Denis Laxalde <denis.laxalde@logilab.fr>
# Date 1436443539 -7200
#      Thu Jul 09 14:05:39 2015 +0200
# Node ID f7f443e56208adec8946ea8bcce0fa5257cd0725
# Parent  2bed23a2ab762e710c2969b010b262e16fe61d15
Handle kwargs in composite_entities_graph

And pass them to composite_schema_graph.

diff --git a/entities.py b/entities.py
--- a/entities.py
+++ b/entities.py
@@ -82,19 +82,20 @@
         yield relation, ends
 
 
-def composite_entities_graph(parent):
+def composite_entities_graph(parent, **kwargs):
     """Yield arcs of a graph of compositely-related entities reachable from
     `parent` entity.
 
     An "arc" is a tuple `(child entity, (rtype, role), parent entity)`.
     """
     for (rtype, role), ends in composite_schema_graph(parent._cw.vreg.schema,
-                                                      parent.cw_etype):
+                                                      parent.cw_etype,
+                                                      **kwargs):
         for child_etype in ends:
             rset = parent.related(rtype, role=role, targettypes=[child_etype])
             for child in rset.entities():
                 yield child, (rtype, neg_role(role)), parent
-                for x in composite_entities_graph(child):
+                for x in composite_entities_graph(child, **kwargs):
                     yield x