-
Notifications
You must be signed in to change notification settings - Fork 10.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document async def interfaces for signals #4852
Comments
@Gallaecio I want to work on this issue. Can you please tell how to start with? |
@codeslash21 Sure. Scrapy uses Twisted, which has a class called Deferred, which is used to implement asynchronous code. You may find more information about them in the Twisted documentation, but it’s a complex topic, and full understanding is not needed for this task, I think. However, Twisted also allows to write code using Python coroutines, also known as We actually have this covered in the documentation of Scrapy, at https://docs.scrapy.org/en/latest/topics/coroutines.html, with a good example of how a piece of code looks with Deferreds, and how the same code can be rewritten with coroutine syntax. If you manage to understand that example, I think you should be able to handle this task, which would consist of:
|
@Gallaecio Thanks, for your guidance. |
is this issue still up for grabs? I didnt see a pull request linked to it |
@rox117 I think so. |
Can I take this issue please ? I have been working on this one for almost a day now, trying to learn my way around coroutines and deferred objects. |
It'd be nice to mention
async def
approach in https://docs.scrapy.org/en/latest/topics/signals.html#deferred-signal-handlers, and maybe even rewrite the example to it.The text was updated successfully, but these errors were encountered: