[cleanup] fix deprecation warnings
authorNicolas Chauvat <nicolas.chauvat@logilab.fr>
Thu, 23 Jul 2009 14:09:16 +0200
changeset 2438 576f4d51f826
parent 2433 1d46c016a564
child 2439 77d8dd77acb3
[cleanup] fix deprecation warnings
schemas/base.py
schemas/bootstrap.py
web/test/data/schema/testschema.py
web/views/workflow.py
--- a/schemas/base.py	Thu Jul 23 13:03:50 2009 +0200
+++ b/schemas/base.py	Thu Jul 23 14:09:16 2009 +0200
@@ -102,7 +102,7 @@
     # 0..n cardinality for entities created by internal session (no attached user)
     # and to support later deletion of a user which has created some entities
     cardinality = '**'
-    subject = '**'
+    subject = '*'
     object = 'CWUser'
 
 class created_by(RelationType):
@@ -115,20 +115,20 @@
     # 0..1 cardinality for entities created by internal session (no attached user)
     # and to support later deletion of a user which has created some entities
     cardinality = '?*'
-    subject = '**'
+    subject = '*'
     object = 'CWUser'
 
 
 class creation_date(RelationType):
     """creation time of an entity"""
     cardinality = '11'
-    subject = '**'
+    subject = '*'
     object = 'Datetime'
 
 class modification_date(RelationType):
     """latest modification time of an entity"""
     cardinality = '11'
-    subject = '**'
+    subject = '*'
     object = 'Datetime'
 
 
--- a/schemas/bootstrap.py	Thu Jul 23 13:03:50 2009 +0200
+++ b/schemas/bootstrap.py	Thu Jul 23 14:09:16 2009 +0200
@@ -233,7 +233,7 @@
         'delete': (),
         }
     cardinality = '1*'
-    subject = '**'
+    subject = '*'
     object = 'CWEType'
 
 class is_instance_of(RelationType):
@@ -248,7 +248,7 @@
         'delete': (),
         }
     cardinality = '+*'
-    subject = '**'
+    subject = '*'
     object = 'CWEType'
 
 class specializes(RelationType):
--- a/web/test/data/schema/testschema.py	Thu Jul 23 13:03:50 2009 +0200
+++ b/web/test/data/schema/testschema.py	Thu Jul 23 14:09:16 2009 +0200
@@ -5,6 +5,11 @@
 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
 """
+
+from yams.buildobjs import (EntityType, RelationDefinition, RelationType, String,
+                            Int, SubjectRelation)
+from yams.constraints import IntervalBoundConstraint
+
 class Salesterm(EntityType):
     described_by_test = SubjectRelation('File', cardinality='1*', composite='subject')
     amount = Int(constraints=[IntervalBoundConstraint(0, 100)])
--- a/web/views/workflow.py	Thu Jul 23 13:03:50 2009 +0200
+++ b/web/views/workflow.py	Thu Jul 23 14:09:16 2009 +0200
@@ -18,6 +18,7 @@
 from cubicweb.selectors import (implements, has_related_entities,
                                 relation_possible, match_form_params)
 from cubicweb.interfaces import IWorkflowable
+from cubicweb.view import EntityView
 from cubicweb.web import stdmsgs, action, component, form
 from cubicweb.web.form import FormViewMixIn
 from cubicweb.web.formfields import StringField,  RichTextField