# HG changeset patch # User Sylvain Thénault # Date 1286885587 -7200 # Node ID 97203d0af4cb4ccb1c47ad6d90b07dd2f8a5b304 # Parent 7fdd780d87e4bca7f725f58c0f25a4708330c625 [test/possible views] skip deprecated views diff -r 7fdd780d87e4 -r 97203d0af4cb cwvreg.py --- a/cwvreg.py Tue Oct 12 14:10:58 2010 +0200 +++ b/cwvreg.py Tue Oct 12 14:13:07 2010 +0200 @@ -196,7 +196,7 @@ from warnings import warn from logilab.common.decorators import cached, clear_cache -from logilab.common.deprecation import deprecated +from logilab.common.deprecation import deprecated, class_deprecated from logilab.common.modutils import cleanup_sys_modules from rql import RQLHelper @@ -389,6 +389,8 @@ for vid, views in self.items(): if vid[0] == '_': continue + views = [view for view in views + if not isinstance(view, class_deprecated)] try: view = self._select_best(views, req, rset=rset, **kwargs) if view.linkable(): diff -r 7fdd780d87e4 -r 97203d0af4cb devtools/testlib.py --- a/devtools/testlib.py Tue Oct 12 14:10:58 2010 +0200 +++ b/devtools/testlib.py Tue Oct 12 14:13:07 2010 +0200 @@ -37,7 +37,7 @@ from logilab.common.debugger import Debugger from logilab.common.umessage import message_from_string from logilab.common.decorators import cached, classproperty, clear_cache -from logilab.common.deprecation import deprecated +from logilab.common.deprecation import deprecated, class_deprecated from cubicweb import ValidationError, NoSelectableObject, AuthenticationError from cubicweb import cwconfig, devtools, web, server @@ -495,7 +495,8 @@ continue views = [view for view in views if view.category != 'startupview' - and not issubclass(view, notification.NotificationView)] + and not issubclass(view, notification.NotificationView) + and not isinstance(view, class_deprecated)] if views: try: view = viewsvreg._select_best(views, req, rset=rset)