Scrapy, a fast high-level web crawling & scraping framework for Python.
Merge branch 'master' into 4307-use-f-strings
Ammar Najjar7597193dbe4c
diff --cc scrapy/utils/deprecate.pyindex fb7e69889,8277a3c8f..f5b17416f--- a/scrapy/utils/deprecate.py+++ b/scrapy/utils/deprecate.py@@@ -134,9 -135,9 +134,9 @@@ DEPRECATION_RULES =def update_classpath(path):"""Update a deprecated path from an object with its new location"""for prefix, replacement in DEPRECATION_RULES:- if path.startswith(prefix):+ if isinstance(path, str) and path.startswith(prefix):new_path = path.replace(prefix, replacement, 1)- warnings.warn("`{}` class is deprecated, use `{}` instead".format(path, new_path),+ warnings.warn(f"`{path}` class is deprecated, use `{new_path}` instead",ScrapyDeprecationWarning)return new_pathreturn path