Skip to content

fix(scrapy): Drop deprecated spider arg from Scrapy proxy middleware methods#977

Open
vdusek wants to merge 3 commits into
masterfrom
fix/scrapy-proxy-spider-arg
Open

fix(scrapy): Drop deprecated spider arg from Scrapy proxy middleware methods#977
vdusek wants to merge 3 commits into
masterfrom
fix/scrapy-proxy-spider-arg

Conversation

@vdusek

@vdusek vdusek commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Scrapy ≥2.14 deprecated the spider parameter on downloader-middleware methods and emits a ScrapyDeprecationWarning on every run for any method that still requires it. ApifyHttpProxyMiddleware.process_request and process_exception only used spider for debug logging, so this drops the parameter (and its docstring/log references), mirroring the already-migrated ActorDatasetPushPipeline.

A regression test registers the middleware via DownloaderMiddlewareManager and asserts no "requires a spider argument" warning is emitted.

@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Jun 12, 2026
@vdusek vdusek self-assigned this Jun 12, 2026
@github-actions github-actions Bot added this to the 142nd sprint - Tooling team milestone Jun 12, 2026
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label Jun 12, 2026
@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.87%. Comparing base (0daca28) to head (0e941bb).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #977      +/-   ##
==========================================
- Coverage   89.90%   89.87%   -0.04%     
==========================================
  Files          49       49              
  Lines        3091     3091              
==========================================
- Hits         2779     2778       -1     
- Misses        312      313       +1     
Flag Coverage Δ
e2e 35.91% <0.00%> (ø)
integration 56.90% <0.00%> (+0.03%) ⬆️
unit 78.68% <100.00%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek vdusek changed the title fix: Drop deprecated spider arg from Scrapy proxy middleware methods fix(scrapy): Drop deprecated spider arg from Scrapy proxy middleware methods Jun 12, 2026
@vdusek vdusek marked this pull request as ready for review June 12, 2026 17:10
@vdusek vdusek requested a review from Pijukatel June 12, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants