[migration] fix 3.15 deprecation warnings (closes #2750550)

authorNicolas Chauvat <nicolas.chauvat@logilab.fr>
changesetc26b9d268046
branchdefault
phasepublic
hiddenno
parent revision#5aa28d5833b6 fix test when running from outside the test directory (as done by eg apycot)
child revision#6d0cbc843afb [packaging] prepare 0.3.0
files modified by this revision
__pkginfo__.py
views.py
# HG changeset patch
# User Nicolas Chauvat <nicolas.chauvat@logilab.fr>
# Date 1363203451 -3600
# Wed Mar 13 20:37:31 2013 +0100
# Node ID c26b9d2680469b97d756d8aa3102ee32c78a159d
# Parent 5aa28d5833b6b6da096e8c3372f28987ff15d190
[migration] fix 3.15 deprecation warnings (closes #2750550)

diff --git a/__pkginfo__.py b/__pkginfo__.py
@@ -55,8 +55,8 @@
1      if isdir(dname):
2          data_files.append([join(THIS_CUBE_DIR, dname), listdir(dname)])
3  # Note: here, you'll need to add subdirectories if you want
4  # them to be included in the debian package
5 
6 -__depends__ =  {'cubicweb': '>= 3.9.3'}
7 +__depends__ =  {'cubicweb': '>= 3.15.0'}
8  __recommends__ = {}
9 
diff --git a/views.py b/views.py
@@ -25,11 +25,12 @@
10  __docformat__ = "restructuredtext en"
11 
12  import os.path as osp
13  import base64
14 
15 -from cubicweb.selectors import objectify_selector
16 +from logilab.common.registry import objectify_predicate
17 +
18  from cubicweb.web.views import authentication, actions, basecontrollers
19 
20  from cubes.trustedauth.cryptutils import build_cypher
21 
22  # web authentication info retreiver ############################################
@@ -81,11 +82,11 @@
23              login, realm = req.get_header('x-remote-user', None)
24          except Exception:
25              return None
26          return login
27 
28 -@objectify_selector
29 +@objectify_predicate
30  def trust_authenticated(cls, req, rset=None, **kwargs):
31      return int(getattr(req.cnx, 'trusted_cwuser', False))
32 
33 
34  class LogoutController(basecontrollers.LogoutController):