Skip to content

Deprecate running Crawler.crawl() twice. #6040

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

Merged
merged 2 commits into from
Sep 6, 2023

Conversation

wRAR
Copy link
Member

@wRAR wRAR commented Sep 6, 2023

Fixes #1587

@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Merging #6040 (da1916c) into master (c1dd549) will decrease coverage by 0.90%.
The diff coverage is 100.00%.

❗ Current head da1916c differs from pull request most recent head b39d2d4. Consider uploading reports for the commit b39d2d4 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6040      +/-   ##
==========================================
- Coverage   88.92%   88.02%   -0.90%     
==========================================
  Files         163      163              
  Lines       11535    11538       +3     
  Branches     1876     1877       +1     
==========================================
- Hits        10257    10156     -101     
- Misses        969     1073     +104     
  Partials      309      309              
Files Changed Coverage Δ
scrapy/crawler.py 86.50% <100.00%> (-0.81%) ⬇️

... and 15 files with indirect coverage changes

@wRAR wRAR marked this pull request as draft September 6, 2023 15:38
warnings.warn(
"Running Crawler.crawl() more than once is deprecated.",
ScrapyDeprecationWarning,
stacklevel=2,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With 2 it's still not helpful as it points to twisted/internet/defer.py (as inlineCallbacks turns into several frames), but I'm not sure if it's possible to set a correct number here.

@wRAR wRAR marked this pull request as ready for review September 6, 2023 15:44
@wRAR wRAR merged commit 00527fd into scrapy:master Sep 6, 2023
@wRAR wRAR deleted the deprecate-double-crawl branch September 6, 2023 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple crawls with the same crawler
2 participants