removed (pretty useless) DebugMiddleware

This commit is contained in:
Pablo Hoffman 2009-09-04 12:59:58 -03:00
parent 86de5180fc
commit 96bb223c13
2 changed files with 0 additions and 38 deletions

View File

@ -153,20 +153,6 @@ DefaultHeadersMiddleware
This middleware sets all default requests headers specified in the
:setting:`DEFAULT_REQUEST_HEADERS` setting.
DebugMiddleware
---------------
.. module:: scrapy.contrib.downloadermiddleware.debug
:synopsis: Downloader middlewares for debugging
.. class:: DebugMiddleware
This is a convenient middleware to inspect what's passing through the
downloader middleware. It logs all requests and responses catched by the
middleware component methods. This middleware does not use any settings and
does not come enabled by default. Instead, it's meant to be inserted at the
point of the middleware that you want to inspect.
HttpAuthMiddleware
------------------

View File

@ -1,24 +0,0 @@
from scrapy import log
from scrapy.core.exceptions import NotConfigured
class DebugMiddleware(object):
def process_request(self, request, spider):
log.msg("process_request %r" % request, domain=spider.domain_name, level=log.DEBUG)
def process_exception(self, request, exception, spider):
log.msg("process_exception %s in %r" % (exception, request), domain=spider.domain_name, level=log.DEBUG)
def process_response(self, request, response, spider):
log.msg("process_response %s from %r" % (response, request), domain=spider.domain_name, level=log.DEBUG)
return response
# FIXME: backwards compatibility - will be removed before 0.7 release
import warnings
class CrawlDebug(object):
def __init__(self):
warnings.warn("scrapy.contrib.downloadermiddleware.debug.CrawlDebug has been replaced by scrapy.contrib.downloadermiddleware.debug.DebugDownloaderMiddleware")
DebugMiddleware.__init__(self)