MCPcopy
hub / github.com/scrapy/scrapy / install_reactor_import_hook

Function install_reactor_import_hook

scrapy/utils/reactorless.py:50–53  ·  view source on GitHub ↗

Prevent importing :mod:`twisted.internet.reactor`.

()

Source from the content-addressed store, hash-verified

48
49
50def install_reactor_import_hook() -> None:
51 """Prevent importing :mod:`twisted.internet.reactor`."""
52
53 sys.meta_path.insert(0, ReactorImportHook())

Callers 2

pytest_configureFunction · 0.90
__init__Method · 0.90

Calls 1

ReactorImportHookClass · 0.85

Tested by 1

pytest_configureFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…