Andrey Rakhmatullin
Andrey Rakhmatullin
Hello! Can you please tell us if you are still planning to work on this? Thank you!
Was there a behavior change? If so the wrong commit is linked.
It's even typed as `Deferred[MutableChain[_T] | MutableAsyncChain[_T]]` [in 2.12](https://github.com/scrapy/scrapy/blob/2.12/scrapy/core/spidermw.py#L312C10-L312C60), though that could be an incorrect hint.
> await spider_middlewares.scrape_response(lambda *args: args, response, request, spider) This lambda is passed as `scrape_func`, which is **not** supposed to return `tuple[Response, Request, Spider]`, not sure what has changed so that...
It should be `download_async()` :)
Interesting, it indeed fails (only with the default reactor, likely because with the asyncio one we no longer use `DelayedCall`), I'll check if it's possible to fix in a less...
I think the problem is caused by the real `self.engine.downloader` being overwritten with a mock. It looks like adding `self.engine.downloader.close()` before `self.engine.downloader = Mock()` fixes this without a need for...
I've also forgot to ask why have you said that it only partially solves the issue, as I think it completely solves it :)
Those tests should be fixed in master and they don't fail on CI so you may be doing something unusual, e.g. not testing the branch you pushed.
Why do you think this code solves your problem?