Scrapy, a fast high-level web crawling & scraping framework for Python.
Fix httpcache leveldb tests: gc.collect after del
Konstantin Lopuhina8df0900713a
diff --git a/scrapy/extensions/httpcache.py b/scrapy/extensions/httpcache.pyindex 2fb4b6a15..648b32ec7 100644--- a/scrapy/extensions/httpcache.py+++ b/scrapy/extensions/httpcache.py@@ -13,7 +13,7 @@ from scrapy.responsetypes import responsetypesfrom scrapy.utils.request import request_fingerprintfrom scrapy.utils.project import data_pathfrom scrapy.utils.httpobj import urlparse_cached-from scrapy.utils.python import to_bytes, to_unicode+from scrapy.utils.python import to_bytes, to_unicode, garbage_collectlogger = logging.getLogger(__name__)@@ -362,6 +362,7 @@ class LeveldbCacheStorage(object):# avoid them being removed in storages with timestamp-based autoremoval.self.db.CompactRange()del self.db+ garbage_collect()def retrieve_response(self, spider, request):data = self._read_data(spider, request)