diff --git a/src/caoscrawler/crawl.py b/src/caoscrawler/crawl.py index 3376f7ff5d7c8674b98f32621dbda8501e488609..eee0046c9d4f97b66a91d87ce0439b7e5af232f9 100644 --- a/src/caoscrawler/crawl.py +++ b/src/caoscrawler/crawl.py @@ -178,11 +178,18 @@ class Crawler(object): """ def __init__(self, + generalStore: Optional[GeneralStore] = None, + debug: bool = False, identifiableAdapter: Optional[IdentifiableAdapter] = None, securityMode: SecurityMode = SecurityMode.UPDATE): """ Create a new crawler and initialize an empty RecordStore and GeneralStore. + Deprecated arguments: + - The debug argument does not have an effect anymore. + - generalStore: This argument does not have an effect anymore. It might be added to the scanning + functions in the scanner module in the future, if needed. + Parameters ---------- identifiableAdapter : IdentifiableAdapter @@ -203,6 +210,16 @@ class Crawler(object): if identifiableAdapter is not None: self.identifiableAdapter = identifiableAdapter + if not debug: + # TODO: not ideal, how to warn if debug is explicitely set to false? + warnings.warn(DeprecationWarning( + "The debug argument of the Crawler class is deprecated and has no effect.")) + + if generalStore is not None: + warnings.warn(DeprecationWarning( + "The generalStore argument of the Crawler class is deprecated and has no effect.")) + + def generate_run_id(self): self.run_id = uuid.uuid1()