You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if anyone out there is using this setting for the purpose I was looking for, to tell apart scrapy shell from something else. And I wonder if, rather than removing that line of code, we should go for a more complex deprecation procedure.
But if we are removing or deprecating what to me looks like the most straightforward way at the moment to tell if you are in scrapy shell, I think we may want to consider providing or documenting an alternative way as part of the change that removes or deprecates this setting.
For example, we could add a new setting (e.g. IN_SHELL=True). Or maybe it is possible to check if the current thread is the main one, and detect it that way. But I think we should choose what the right way to check this should be, and cover it in the documentation.
The text was updated successfully, but these errors were encountered:
Yes, but it's probably something unrelated due to how crawler is instantiated during the Shell creation and I wouldn't use crawler.engine.slot is None to determine if you are in scrapy shell or not.
Looking for a way to distinguish when code is executed within
scrapy shell
or otherwise, I found thatscrapy shell
sets this setting toTrue
.This setting was added in Scrapy 0.10, and removed in the follow-up Scrapy 0.14, but it seems we missed the appearance I linked above.
I wonder if anyone out there is using this setting for the purpose I was looking for, to tell apart
scrapy shell
from something else. And I wonder if, rather than removing that line of code, we should go for a more complex deprecation procedure.But if we are removing or deprecating what to me looks like the most straightforward way at the moment to tell if you are in
scrapy shell
, I think we may want to consider providing or documenting an alternative way as part of the change that removes or deprecates this setting.For example, we could add a new setting (e.g.
IN_SHELL=True
). Or maybe it is possible to check if the current thread is the main one, and detect it that way. But I think we should choose what the right way to check this should be, and cover it in the documentation.The text was updated successfully, but these errors were encountered: