Skip to content

More docs for the is_asyncio_reactor_installed() behavior change. #6866

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 1 commit into from
Jun 6, 2025

Conversation

wRAR
Copy link
Member

@wRAR wRAR commented Jun 6, 2025

No description provided.

@wRAR wRAR added this to the 2.13.2 milestone Jun 6, 2025
@wRAR wRAR added the docs label Jun 6, 2025
Copy link

codecov bot commented Jun 6, 2025

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 90.83%. Comparing base (b20995c) to head (31aefd2).
Report is 2 commits behind head on 2.13.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
scrapy/utils/test.py 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             2.13    #6866      +/-   ##
==========================================
- Coverage   90.85%   90.83%   -0.02%     
==========================================
  Files         164      164              
  Lines       12353    12355       +2     
  Branches     1606     1607       +1     
==========================================
  Hits        11223    11223              
- Misses        828      829       +1     
- Partials      302      303       +1     
Files with missing lines Coverage Δ
scrapy/utils/reactor.py 88.88% <ø> (ø)
scrapy/utils/test.py 55.31% <33.33%> (-1.21%) ⬇️

@@ -117,6 +117,11 @@ def get_reactor_settings() -> dict[str, Any]:
settings, so tests that run the crawler in the current process may need to
pass a correct ``"TWISTED_REACTOR"`` setting value when creating it.
"""
if not is_reactor_installed():
raise RuntimeError(
Copy link
Member Author

Choose a reason for hiding this comment

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

Writing a test for this would need running a standalone script, but I checked this with scrapinghub-entrypoint-scrapy before scrapinghub/scrapinghub-entrypoint-scrapy#94 and it produces the correct exception.

@Gallaecio Gallaecio merged commit 405d9bc into scrapy:2.13 Jun 6, 2025
36 of 37 checks passed
@wRAR wRAR deleted the check-reactor branch June 9, 2025 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants