Skip to content
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

asyncio docs: cover accidental bad reactor installation #6000

Merged

Conversation

Gallaecio
Copy link
Member

@Gallaecio Gallaecio commented Aug 4, 2023

Resolves #5981.

Changes:

  • Changed section sorting, let me know if it makes sense to you.
  • Reworded the Windows section to avoid Python version references not necessary since the 3.7 drop, and to simplify things. I removed the instructions to manually changing the loop because I cannot think of a need for them given install_reactor, but I am not 100% sure.
  • Added a section about handling early module-level Twisted imports that install the default, non-asyncio reactor. This was the initial goal here.

I wonder if we need to cover better the possibility of using a Twisted-powered software that installs a reactor before any user code is executed. I checked and scrapyd seems not to have an issue with that anymore, and I don’t know what other Twisted-powered stuff is popularly used to run Scrapy.

@Gallaecio Gallaecio requested review from kmike and wRAR August 4, 2023 08:02
@codecov
Copy link

codecov bot commented Aug 4, 2023

Codecov Report

Merging #6000 (692e0d6) into master (09c63a1) will not change coverage.
The diff coverage is n/a.

❗ Current head 692e0d6 differs from pull request most recent head 72de48b. Consider uploading reports for the commit 72de48b to get more accurate results

@@           Coverage Diff           @@
##           master    #6000   +/-   ##
=======================================
  Coverage   89.24%   89.24%           
=======================================
  Files         162      162           
  Lines       11325    11325           
  Branches     1835     1835           
=======================================
  Hits        10107    10107           
  Misses        927      927           
  Partials      291      291           

Copy link
Member

@wRAR wRAR left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@wRAR wRAR merged commit 1263838 into scrapy:master Aug 4, 2023
26 checks passed
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.

Document the wrong reactor problem
2 participants