diff --git a/pkgs/development/python-modules/scrapy/default.nix b/pkgs/development/python-modules/scrapy/default.nix index c0ec21bf6afd..88ecd6f2be8a 100644 --- a/pkgs/development/python-modules/scrapy/default.nix +++ b/pkgs/development/python-modules/scrapy/default.nix @@ -14,6 +14,7 @@ , lxml , packaging , parsel +, pexpect , protego , pydispatcher , pyopenssl @@ -42,6 +43,18 @@ buildPythonPackage rec { hash = "sha256-PL3tzgw/DgSC1hvi10WGg758188UsO5q37rduA9bNqU="; }; + patches = [ + # Fix compatiblity with Twisted>=23.8. Remove with the next release. + (fetchpatch { + url = "https://github.com/scrapy/scrapy/commit/aa95ada42cdf570f840f55c463375f8a81b303f8.patch"; + hash = "sha256-LuhA5BqtjSUgkotplvUCtvGNYOTrl0MJRCXiSBMDFzY="; + excludes = [ + "tests/CrawlerProcess/sleeping.py" + "tests/test_crawler.py" + ]; + }) + ]; + nativeBuildInputs = [ installShellFiles ]; @@ -69,6 +82,7 @@ buildPythonPackage rec { botocore glibcLocales jmespath + pexpect pytestCheckHook sybil testfixtures