Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Rename scrapy/statscol.py to scrapy/statscollectors.py

Julia Medinab827097c91eb
diff --git a/docs/topics/api.rst b/docs/topics/api.rst
index 89e300b39..7805f63d3 100644
--- a/docs/topics/api.rst
+++ b/docs/topics/api.rst
@@ -65,7 +65,7 @@ how you :ref:`configure the downloader middlewares
For an introduction on stats collection see :ref:`topics-stats`.
- For the API see :class:`~scrapy.statscol.StatsCollector` class.
+ For the API see :class:`~scrapy.statscollectors.StatsCollector` class.
.. attribute:: extensions
@@ -452,11 +452,11 @@ Stats Collector API
===================
There are several Stats Collectors available under the
-:mod:`scrapy.statscol` module and they all implement the Stats
-Collector API defined by the :class:`~scrapy.statscol.StatsCollector`
+:mod:`scrapy.statscollectors` module and they all implement the Stats
+Collector API defined by the :class:`~scrapy.statscollectors.StatsCollector`
class (which they all inherit from).
-.. module:: scrapy.statscol
+.. module:: scrapy.statscollectors
:synopsis: Stats Collectors
.. class:: StatsCollector
diff --git a/docs/topics/settings.rst b/docs/topics/settings.rst
index f035bc33d..26a6d762d 100644
--- a/docs/topics/settings.rst
+++ b/docs/topics/settings.rst
@@ -936,7 +936,7 @@ Example::
STATS_CLASS
-----------
-Default: ``'scrapy.statscol.MemoryStatsCollector'``
+Default: ``'scrapy.statscollectors.MemoryStatsCollector'``
The class to use for collecting stats, who must implement the
:ref:`topics-api-stats`.
diff --git a/docs/topics/stats.rst b/docs/topics/stats.rst
index 5560a9446..0837610d0 100644
--- a/docs/topics/stats.rst
+++ b/docs/topics/stats.rst
@@ -75,7 +75,7 @@ available in Scrapy which extend the basic Stats Collector. You can select
which Stats Collector to use through the :setting:`STATS_CLASS` setting. The
default Stats Collector used is the :class:`MemoryStatsCollector`.
-.. module:: scrapy.statscol
+.. module:: scrapy.statscollectors
:synopsis: Stats Collectors
MemoryStatsCollector
diff --git a/scrapy/settings/default_settings.py b/scrapy/settings/default_settings.py
index 57dfc3256..7459c4d73 100644
--- a/scrapy/settings/default_settings.py
+++ b/scrapy/settings/default_settings.py
@@ -234,7 +234,7 @@ SPIDER_MIDDLEWARES_BASE = {
SPIDER_MODULES = []
-STATS_CLASS = 'scrapy.statscol.MemoryStatsCollector'
+STATS_CLASS = 'scrapy.statscollectors.MemoryStatsCollector'
STATS_DUMP = True
STATSMAILER_RCPTS = []
diff --git a/scrapy/statscol.py b/scrapy/statscollectors.py
similarity index 100%
rename from scrapy/statscol.py
rename to scrapy/statscollectors.py
diff --git a/tests/test_spidermiddleware_depth.py b/tests/test_spidermiddleware_depth.py
index 8120f1a95..5317795a3 100644
--- a/tests/test_spidermiddleware_depth.py
+++ b/tests/test_spidermiddleware_depth.py
@@ -3,7 +3,7 @@ from unittest import TestCase
from scrapy.spidermiddlewares.depth import DepthMiddleware
from scrapy.http import Response, Request
from scrapy.spider import Spider
-from scrapy.statscol import StatsCollector
+from scrapy.statscollectors import StatsCollector
from scrapy.utils.test import get_crawler
diff --git a/tests/test_stats.py b/tests/test_stats.py
index db1f50712..34f72736c 100644
--- a/tests/test_stats.py
+++ b/tests/test_stats.py
@@ -1,7 +1,7 @@
import unittest
from scrapy.spider import Spider
-from scrapy.statscol import StatsCollector, DummyStatsCollector
+from scrapy.statscollectors import StatsCollector, DummyStatsCollector
from scrapy.utils.test import get_crawler
class StatsCollectorTest(unittest.TestCase):