From cd25ece58a551be6fbf20d8675f4d7c97bb3d6a0 Mon Sep 17 00:00:00 2001 From: Andrey Rakhmatullin Date: Thu, 11 Jun 2026 00:22:30 +0500 Subject: [PATCH] Fix the check for sync ITEM_PROCESSOR methods. (#7589) * Fix the check for sync ITEM_PROCESSOR methods. * Typo. --- scrapy/core/scraper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrapy/core/scraper.py b/scrapy/core/scraper.py index e756d27eb..466ce656d 100644 --- a/scrapy/core/scraper.py +++ b/scrapy/core/scraper.py @@ -125,7 +125,7 @@ class Scraper: def _check_deprecated_itemproc_method(self, method: str) -> None: itemproc_cls = type(self.itemproc) - if not hasattr(self.itemproc, "process_item_async"): + if not hasattr(self.itemproc, f"{method}_async"): warnings.warn( f"{global_object_name(itemproc_cls)} doesn't define a {method}_async() method," f" this is deprecated and the method will be required in future Scrapy versions.",