diff --git a/scrapy/crawler.py b/scrapy/crawler.py index ac77d6aefcc..e302dcd12da 100644 --- a/scrapy/crawler.py +++ b/scrapy/crawler.py @@ -175,7 +175,7 @@ def crawl(self, *args: Any, **kwargs: Any) -> Generator[Deferred, Any, None]: yield self.engine.close() raise - def _create_spider(self, *args: Any, **kwargs: Any) -> Spider: + def _create_spider(self, *args: Any, **kwargs: Any) -> S: return self.spidercls.from_crawler(self, *args, **kwargs) def _create_engine(self) -> ExecutionEngine: diff --git a/setup.py b/setup.py index c2e8b0ee930..d1004785069 100644 --- a/setup.py +++ b/setup.py @@ -24,6 +24,7 @@ "lxml>=4.4.1", "defusedxml>=0.7.1", "opentelemetry-api", + "opentelemetry-sdk" ] extras_require = { ':platform_python_implementation == "CPython"': ["PyDispatcher>=2.0.5"],