about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/scrapy/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/scrapy/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/scrapy/default.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/scrapy/default.nix b/nixpkgs/pkgs/development/python-modules/scrapy/default.nix
index c0ec21bf6afd..88ecd6f2be8a 100644
--- a/nixpkgs/pkgs/development/python-modules/scrapy/default.nix
+++ b/nixpkgs/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