-
Notifications
You must be signed in to change notification settings - Fork 16
Add process_spider_output_async() to the spider middleware. #91
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
base: master
Are you sure you want to change the base?
Conversation
I believe you can install a newer version of the entrypoint through |
@@ -1,5 +1,6 @@ | |||
# -*- coding: utf-8 -*- | |||
import itertools | |||
from warnings import warn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for the call in HubstorageDownloaderMiddleware.from_crawler()
, added in some older change.
@@ -28,11 +29,22 @@ def process_spider_output(self, response, result, spider): | |||
parent = self._seen_requests.pop(response.request, None) | |||
for x in result: | |||
if isinstance(x, Request): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check not extracted because we tentatively decided that as a general pattern for such middlewares we prefer to separate "process_request" and "process_item" logic.
I confirmed this works (if the project has an async middleware, there is a warning normally and no warning if this branch is installed explicitly). |
@wRAR it seems Python 3.7 tests are failing. Do you know if these are CI failures, or if the code actually doesn't work? |
@kmike the Ubuntu 24.04 runner doesn't have 3.7 and earlier, it's a known limitation. I think the suggested way to fix that is pinning 22.04 for such jobs. |
I submitted #92 that includes a fix for the 3.7 CI job. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #91 +/- ##
===========================================
- Coverage 92.24% 23.62% -68.62%
===========================================
Files 15 15
Lines 812 821 +9
===========================================
- Hits 749 194 -555
- Misses 63 627 +564 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Hi @elacuesta ! We are close to releasing the new Scrapy version and unless this change is included in the updated stack there will be warnings about this middleware in the spider logs so can we please proceed with reviewing and merging this in the next several weeks? Thank you! |
Fixes #72.
I wonder how can we test the change on Scrapy Cloud before merging this though?