Closed wRAR closed 1 week ago
+1 to make it public.
Although I wonder if, for examples like the linked one, the right approach could be to allow customizing how slots IDs are generated instead.
@wRAR do you want to promote this method to public and keep the old method with some Deprecate message ?
Yeah, let's make it public and without the extra argument and keep the old one with a deprecation warning.
The
spider
argument is not used inside the method since 2012, but we can't remove it as external code calls it (either because it subclassesDownloader
or because it wants the slot name).Actually maybe we want to promote it to a public method for the second reason? Not sure how often it's needed but see e.g. https://github.com/scrapy-plugins/scrapy-zyte-api/blob/a2284c8cdf157ef6d36c1cc413933761c5ed792b/scrapy_zyte_api/_middlewares.py#L32