[server] deprecate the old multi-source system
It is removed in 3.19.
Closes #2919299
--- a/doc/3.18.rst Fri Oct 18 16:04:23 2013 +0200
+++ b/doc/3.18.rst Fri Oct 18 16:58:48 2013 +0200
@@ -23,6 +23,7 @@
Deprecation
---------------------
+* the old multi-source system
Deprecated Code Drops
--- a/server/msplanner.py Fri Oct 18 16:04:23 2013 +0200
+++ b/server/msplanner.py Fri Oct 18 16:58:48 2013 +0200
@@ -92,6 +92,7 @@
from logilab.common.compat import any
from logilab.common.decorators import cached
+from logilab.common.deprecation import deprecated
from rql import BadRQLQuery
from rql.stmts import Union, Select
@@ -1262,6 +1263,7 @@
inputmap.update(step.outputmap)
+@deprecated('[3.18] old multi-source system will go away in the next version')
class MSPlanner(SSPlanner):
"""MultiSourcesPlanner: build execution plan for rql queries
--- a/server/repository.py Fri Oct 18 16:04:23 2013 +0200
+++ b/server/repository.py Fri Oct 18 16:58:48 2013 +0200
@@ -36,6 +36,7 @@
from os.path import join
from datetime import datetime
from time import time, localtime, strftime
+from warnings import warn
from logilab.common.decorators import cached, clear_cache
from logilab.common.compat import any
@@ -299,6 +300,8 @@
# initialized)
source.init(True, sourceent)
if not source.copy_based_source:
+ warn('[3.18] old multi-source system will go away in the next version',
+ DeprecationWarning)
self.sources.append(source)
self.querier.set_planner()
if add_to_cnxsets:
@@ -1665,18 +1668,24 @@
@cached
def rel_type_sources(self, rtype):
+ warn('[3.18] old multi-source system will go away in the next version',
+ DeprecationWarning)
return tuple([source for source in self.sources
if source.support_relation(rtype)
or rtype in source.dont_cross_relations])
@cached
def can_cross_relation(self, rtype):
+ warn('[3.18] old multi-source system will go away in the next version',
+ DeprecationWarning)
return tuple([source for source in self.sources
if source.support_relation(rtype)
and rtype in source.cross_relations])
@cached
def is_multi_sources_relation(self, rtype):
+ warn('[3.18] old multi-source system will go away in the next version',
+ DeprecationWarning)
return any(source for source in self.sources
if not source is self.system_source
and source.support_relation(rtype))