From 6f2cea4775f4567d13cd68647c501e452b9365a2 Mon Sep 17 00:00:00 2001 From: Pablo Hoffman Date: Sun, 12 Dec 2010 20:04:35 -0200 Subject: [PATCH] added deprecation messages to queue and runserver commands --- scrapy/commands/queue.py | 4 ++++ scrapy/commands/runserver.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/scrapy/commands/queue.py b/scrapy/commands/queue.py index dbede1414..63cf3b5c8 100644 --- a/scrapy/commands/queue.py +++ b/scrapy/commands/queue.py @@ -33,6 +33,10 @@ class Command(runserver.Command): raise UsageError() cmd = args[0] + import warnings + warnings.warn("Scrapy queue command is deprecated - use Scrapyd instead.", \ + DeprecationWarning) + q = self.crawler.queue._queue if cmd == 'add' and len(args) < 2: diff --git a/scrapy/commands/runserver.py b/scrapy/commands/runserver.py index c40133418..9d7fd0615 100644 --- a/scrapy/commands/runserver.py +++ b/scrapy/commands/runserver.py @@ -10,4 +10,7 @@ class Command(ScrapyCommand): return "Deprecated command. Use 'server' command instead" def run(self, args, opts): + import warnings + warnings.warn("Scrapy queue command is deprecated - use 'server' command instead.", \ + DeprecationWarning) self.crawler.start()