Commit 3b9efb47 authored by Stephanie Marcu's avatar Stephanie Marcu
Browse files

remove deprecation warnings cw 3.9

parent 17e564618654
from cubicweb.selectors import implements
from cubicweb.selectors import is_instance
from cubicweb.sobjects.notification import ContentAddedView
class PersonAddedView(ContentAddedView):
"""get notified from new persons"""
__select__ = implements('Person')
__select__ = is_instance('Person')
content_attr = 'description'
......@@ -6,7 +6,7 @@ class PersonTC(CubicWebTC):
self.request().create_entity('Person', firstname=u'adrien', surname=u'di mascio')
def test_dc_title(self):
e = self.entity('Any X WHERE X is Person')
e = self.execute('Any X WHERE X is Person').get_entity(0, 0)
self.assertEquals(e.dc_title(), 'adrien di mascio')
self.assertEquals(e.dc_long_title(), 'Mr adrien di mascio')
......
......@@ -9,7 +9,7 @@ __docformat__ = "restructuredtext en"
from logilab.mtconverter import xml_escape
from cubicweb.schema import display_name
from cubicweb.selectors import implements, rql_condition
from cubicweb.selectors import is_instance, rql_condition
from cubicweb.web import uicfg, action
from cubicweb.web.views import baseviews, primary, vcard
from cubicweb.web.facet import AttributeFacet
......@@ -32,7 +32,7 @@ _afs.tag_subject_of(('Person', 'im_address', '*'), 'main', 'inlined')
class PersonPrimaryView(primary.PrimaryView):
__select__ = implements('Person')
__select__ = is_instance('Person')
attr_table_relations = [('phone', ', '.join),
('use_email', ', '.join),
('im_address', ', '.join),
......@@ -57,7 +57,7 @@ class PersonPrimaryView(primary.PrimaryView):
class PersonTextView(baseviews.TextView):
__select__ = implements('Person')
__select__ = is_instance('Person')
def cell_call(self, row, col):
entity = self.cw_rset.get_entity(row, col)
......@@ -67,7 +67,7 @@ class PersonTextView(baseviews.TextView):
class PersonEmailView(baseviews.EntityView):
"""display emails sent or received by one of this person's addresses"""
__regid__ = 'emails'
__select__ = implements('Person')
__select__ = is_instance('Person')
title = _('emails')
def cell_call(self, row, col=0):
......@@ -91,7 +91,7 @@ class PersonEmailView(baseviews.EntityView):
class VCardPersonView(vcard.VCardCWUserView):
"""export a person information as a vcard"""
__select__ = implements('Person')
__select__ = is_instance('Person')
def vcard_content(self, entity):
w = self.w
......@@ -114,7 +114,7 @@ class VCardPersonView(vcard.VCardCWUserView):
class AddPersonFromEmailAction(action.LinkToEntityAction):
__regid__ = 'addperson-fromemail'
__select__ = implements('EmailAddress') & rql_condition('NOT P use_email X')
__select__ = is_instance('EmailAddress') & rql_condition('NOT P use_email X')
title = _('add Person use_email EmailAddress object')
etype = 'Person'
......@@ -125,5 +125,5 @@ class AddPersonFromEmailAction(action.LinkToEntityAction):
class CivilityFacet(AttributeFacet):
__regid__ = 'civility-facet'
__select__ = implements('Person')
__select__ = is_instance('Person')
rtype = 'civility'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment