[cw] upgrade to cw 3.15 (closes #2493890)
authorNicolas Chauvat <nicolas.chauvat@logilab.fr>
Fri, 21 Sep 2012 22:42:10 +0200
changeset 294 4c332a5552be
parent 292 50b870f78064
child 298 e9526bfa5802
child 299 bdafb02c1aba
[cw] upgrade to cw 3.15 (closes #2493890)
__pkginfo__.py
entities.py
hooks.py
test/unittest_blog.py
views/__init__.py
views/blog.py
views/boxes.py
views/entry.py
--- a/__pkginfo__.py	Tue Jul 17 15:23:27 2012 +0200
+++ b/__pkginfo__.py	Fri Sep 21 22:42:10 2012 +0200
@@ -19,7 +19,7 @@
     'Programming Language :: JavaScript',
     ]
 
-__depends__ = {'cubicweb': '>= 3.10.0'}
+__depends__ = {'cubicweb': '>= 3.15.0'}
 __recommends__ = {'cubicweb-tag': None,
                   'cubicweb-preview': None,
                   'cubicweb-comment': '>= 1.6.3',
--- a/entities.py	Tue Jul 17 15:23:27 2012 +0200
+++ b/entities.py	Fri Sep 21 22:42:10 2012 +0200
@@ -11,7 +11,7 @@
 
 from cubicweb.entities import AnyEntity, fetch_config
 from cubicweb.view import EntityAdapter
-from cubicweb.selectors import is_instance
+from cubicweb.predicates import is_instance
 
 class BlogIFeedAdapter(EntityAdapter):
     __regid__ = 'IFeed'
@@ -40,7 +40,7 @@
 class BlogEntry(AnyEntity):
     """customized class for BlogEntry entities"""
     __regid__ = 'BlogEntry'
-    fetch_attrs, fetch_order = fetch_config(['creation_date', 'title'], order='DESC')
+    fetch_attrs, cw_fetch_order = fetch_config(['creation_date', 'title'], order='DESC')
 
     def dc_title(self):
         return self.title
--- a/hooks.py	Tue Jul 17 15:23:27 2012 +0200
+++ b/hooks.py	Fri Sep 21 22:42:10 2012 +0200
@@ -1,4 +1,4 @@
-from cubicweb.selectors import is_instance, is_in_state
+from cubicweb.predicates import is_instance, is_in_state
 from cubicweb.sobjects.notification import NotificationView, StatusChangeMixIn
 
 class BlogEntryPublishedView(StatusChangeMixIn, NotificationView):
--- a/test/unittest_blog.py	Tue Jul 17 15:23:27 2012 +0200
+++ b/test/unittest_blog.py	Fri Sep 21 22:42:10 2012 +0200
@@ -48,8 +48,8 @@
         blog_entry_1.set_relations(entry_of=cubicweb_blog)
 
         xml = blog_entry_1.view('rssitem')
-        self.assertEquals(xml.count("toto"), 0)
-        self.assertEquals(xml.count("tutu"), content.count("tutu"))
+        self.assertEqual(xml.count("toto"), 0)
+        self.assertEqual(xml.count("tutu"), content.count("tutu"))
 
 if __name__ == '__main__':
     unittest_main()
--- a/views/__init__.py	Tue Jul 17 15:23:27 2012 +0200
+++ b/views/__init__.py	Fri Sep 21 22:42:10 2012 +0200
@@ -1,4 +1,4 @@
-from cubicweb.selectors import is_instance
+from cubicweb.predicates import is_instance
 from cubicweb.view import EntityAdapter
 from cubicweb.web.views import ibreadcrumbs
 from cubicweb.web.views.autoform import AutomaticEntityForm
--- a/views/blog.py	Tue Jul 17 15:23:27 2012 +0200
+++ b/views/blog.py	Fri Sep 21 22:42:10 2012 +0200
@@ -9,7 +9,7 @@
 from logilab.mtconverter import xml_escape
 
 from cubicweb.utils import UStringIO
-from cubicweb.selectors import is_instance
+from cubicweb.predicates import is_instance
 from cubicweb.web import uicfg, component
 from cubicweb.web.views import primary
 
--- a/views/boxes.py	Tue Jul 17 15:23:27 2012 +0200
+++ b/views/boxes.py	Fri Sep 21 22:42:10 2012 +0200
@@ -10,8 +10,8 @@
 from logilab.mtconverter import xml_escape
 
 from cubicweb import tags
-from cubicweb.selectors import (none_rset, one_line_rset, is_instance,
-                                has_related_entities, match_view)
+from cubicweb.predicates import (none_rset, one_line_rset, is_instance,
+                                 has_related_entities, match_view)
 from cubicweb.web import component
 
 
@@ -92,7 +92,7 @@
             'X title T, X creation_date CD')
 
     def render_body(self, w):
-        # XXX turn into a selector
+        # XXX turn into a predicate
         rset = self.latest_blogs_rset()
         if not rset:
             return
--- a/views/entry.py	Tue Jul 17 15:23:27 2012 +0200
+++ b/views/entry.py	Fri Sep 21 22:42:10 2012 +0200
@@ -15,7 +15,7 @@
 
 from cubicweb.schema import display_name
 from cubicweb.view import EntityView
-from cubicweb.selectors import paginated_rset, sorted_rset, is_instance
+from cubicweb.predicates import paginated_rset, sorted_rset, is_instance
 from cubicweb.web import uicfg
 from cubicweb.web.views import primary, baseviews, calendar, navigation, workflow
 from cubicweb.web.views.xmlrss import RSSItemView