--- 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))