diff --git a/docs/news.rst b/docs/news.rst index 63f0d69e4..c1d29d89e 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -2643,7 +2643,7 @@ Deprecation removals (:issue:`6109`, :issue:`6116`) - A custom class assigned to the :setting:`SPIDER_LOADER_CLASS` setting that - does not implement the :class:`~scrapy.interfaces.ISpiderLoader` interface + does not implement the ``ISpiderLoader`` interface will now raise a :exc:`zope.interface.verify.DoesNotImplement` exception at run time. Non-compliant classes have been triggering a deprecation warning since Scrapy 1.0.0. diff --git a/docs/topics/api.rst b/docs/topics/api.rst index 19082d9d7..c80bbd539 100644 --- a/docs/topics/api.rst +++ b/docs/topics/api.rst @@ -178,9 +178,7 @@ SpiderLoader API defined across the project. Custom spider loaders can be employed by specifying their path in the - :setting:`SPIDER_LOADER_CLASS` project setting. They must fully implement - the :class:`scrapy.interfaces.ISpiderLoader` interface to guarantee an - errorless execution. + :setting:`SPIDER_LOADER_CLASS` project setting. .. method:: from_settings(settings) diff --git a/tests/test_spiderloader/__init__.py b/tests/test_spiderloader/__init__.py index d85942f90..8974cec89 100644 --- a/tests/test_spiderloader/__init__.py +++ b/tests/test_spiderloader/__init__.py @@ -5,14 +5,12 @@ from pathlib import Path from unittest import mock import pytest -from zope.interface.verify import verifyObject # ugly hack to avoid cyclic imports of scrapy.spiders when running this test # alone import scrapy from scrapy.crawler import CrawlerRunner from scrapy.http import Request -from scrapy.interfaces import ISpiderLoader from scrapy.settings import Settings from scrapy.spiderloader import DummySpiderLoader, SpiderLoader, get_spider_loader @@ -45,9 +43,6 @@ def spider_loader(spider_loader_env): class TestSpiderLoader: - def test_interface(self, spider_loader): - verifyObject(ISpiderLoader, spider_loader) - def test_list(self, spider_loader): assert set(spider_loader.list()) == { "spider1",