[hooks/security, devtools/fill] silence yams 0.38.0 warnings stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Wed, 12 Feb 2014 18:15:32 +0100
branchstable
changeset 9521 9eb810333b0f
parent 9438 1910d86afcbc
child 9522 8154a5748194
[hooks/security, devtools/fill] silence yams 0.38.0 warnings
__pkginfo__.py
cubicweb.spec
debian/control
devtools/fill.py
hooks/security.py
--- a/__pkginfo__.py	Tue Jan 21 14:56:06 2014 +0100
+++ b/__pkginfo__.py	Wed Feb 12 18:15:32 2014 +0100
@@ -43,7 +43,7 @@
     'logilab-common': '>= 0.59.0',
     'logilab-mtconverter': '>= 0.8.0',
     'rql': '>= 0.31.2',
-    'yams': '>= 0.37.0',
+    'yams': '>= 0.38.1',
     #gettext                    # for xgettext, msgcat, etc...
     # web dependancies
     'simplejson': '>= 2.0.9',
--- a/cubicweb.spec	Tue Jan 21 14:56:06 2014 +0100
+++ b/cubicweb.spec	Wed Feb 12 18:15:32 2014 +0100
@@ -23,7 +23,7 @@
 Requires:       %{python}-logilab-common >= 0.59.0
 Requires:       %{python}-logilab-mtconverter >= 0.8.0
 Requires:       %{python}-rql >= 0.31.2
-Requires:       %{python}-yams >= 0.37.0
+Requires:       %{python}-yams >= 0.38.1
 Requires:       %{python}-logilab-database >= 1.10.0
 Requires:       %{python}-passlib
 Requires:       %{python}-lxml
--- a/debian/control	Tue Jan 21 14:56:06 2014 +0100
+++ b/debian/control	Wed Feb 12 18:15:32 2014 +0100
@@ -15,7 +15,7 @@
  python-unittest2 | python (>= 2.7),
  python-logilab-mtconverter,
  python-rql,
- python-yams (>= 0.37),
+ python-yams (>= 0.38.1),
  python-lxml,
 Standards-Version: 3.9.1
 Homepage: http://www.cubicweb.org
@@ -151,7 +151,7 @@
  gettext,
  python-logilab-mtconverter (>= 0.8.0),
  python-logilab-common (>= 0.59.0),
- python-yams (>= 0.37.0),
+ python-yams (>= 0.38.1),
  python-yams (<< 0.39),
  python-rql (>= 0.31.2),
  python-lxml
--- a/devtools/fill.py	Tue Jan 21 14:56:06 2014 +0100
+++ b/devtools/fill.py	Wed Feb 12 18:15:32 2014 +0100
@@ -384,10 +384,10 @@
 
 def composite_relation(rschema):
     for obj in rschema.objects():
-        if obj.rdef(rschema, 'object').composite == 'subject':
+        if obj.rdef(rschema, 'object', takefirst=True).composite == 'subject':
             return True
     for obj in rschema.subjects():
-        if obj.rdef(rschema, 'subject').composite == 'object':
+        if obj.rdef(rschema, 'subject', takefirst=True).composite == 'object':
             return True
     return False
 
--- a/hooks/security.py	Tue Jan 21 14:56:06 2014 +0100
+++ b/hooks/security.py	Wed Feb 12 18:15:32 2014 +0100
@@ -41,7 +41,7 @@
     for attr in editedattrs:
         if attr in dontcheck:
             continue
-        rdef = eschema.rdef(attr)
+        rdef = eschema.rdef(attr, takefirst=True)
         if rdef.final: # non final relation are checked by standard hooks
             # attributes only have a specific 'update' permission
             updateperm = rdef.permissions.get('update')