summary refs log tree commit diff
path: root/pkgs/development/python-modules/trio/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/trio/default.nix')
-rw-r--r--pkgs/development/python-modules/trio/default.nix21
1 files changed, 18 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/trio/default.nix b/pkgs/development/python-modules/trio/default.nix
index fb985e890a7..c01db3259a7 100644
--- a/pkgs/development/python-modules/trio/default.nix
+++ b/pkgs/development/python-modules/trio/default.nix
@@ -6,6 +6,7 @@
 , idna
 , outcome
 , pytestCheckHook
+, pytest-trio
 , pyopenssl
 , trustme
 , sniffio
@@ -16,15 +17,24 @@
 , coreutils
 }:
 
+let
+  # escape infinite recursion with pytest-trio
+  pytest-trio' = (pytest-trio.override {
+    trio = null;
+  }).overrideAttrs {
+    doCheck = false;
+    pythonImportsCheck = [];
+  };
+in
 buildPythonPackage rec {
   pname = "trio";
-  version = "0.22.0";
+  version = "0.22.2";
   format = "setuptools";
   disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-zmjxxUAKR7E3xaTecsfJAb1OeiT73r/ptB3oxsBOqs8=";
+    hash = "sha256-OIfPGMi8yJRDNCAwVGg4jax2ky6WaK+hxJqjgGtqzLM=";
   };
 
   propagatedBuildInputs = [
@@ -46,13 +56,16 @@ buildPythonPackage rec {
     jedi
     pyopenssl
     pytestCheckHook
+    pytest-trio'
     trustme
     yapf
   ];
 
   preCheck = ''
-    substituteInPlace trio/tests/test_subprocess.py \
+    substituteInPlace trio/_tests/test_subprocess.py \
       --replace "/bin/sleep" "${coreutils}/bin/sleep"
+
+    export HOME=$TMPDIR
   '';
 
   # It appears that the build sandbox doesn't include /etc/services, and these tests try to use it.
@@ -64,6 +77,8 @@ buildPythonPackage rec {
     "static_tool_sees_all_symbols"
     # tests pytest more than python
     "fallback_when_no_hook_claims_it"
+    # requires mypy
+    "test_static_tool_sees_class_members"
   ];
 
   pytestFlagsArray = [