From abc9aa873776625ef0063e6e8df8d0dd4ea63e07 Mon Sep 17 00:00:00 2001 From: Andrey Rakhmatullin Date: Tue, 19 May 2020 11:37:25 +0500 Subject: [PATCH] Restore and deprecate utils.py36 --- scrapy/utils/py36.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 scrapy/utils/py36.py diff --git a/scrapy/utils/py36.py b/scrapy/utils/py36.py new file mode 100644 index 000000000..db33a361d --- /dev/null +++ b/scrapy/utils/py36.py @@ -0,0 +1,13 @@ +""" +collect_asyncgen was put here but later moved to utils.asyncgen. +""" + +import warnings + +from scrapy.exceptions import ScrapyDeprecationWarning +from scrapy.utils.asyncgen import collect_asyncgen # noqa: F401 + + +warnings.warn("Module `scrapy.utils.py36` is deprecated. " + "Please import `collect_asyncgen` from `scrapy.utils.asyncgen` instead.", + ScrapyDeprecationWarning, stacklevel=2)