pythonPackages.pytestCheckHook_6_1: only override for Python 3

Changed files
+9 -1
pkgs
+9 -1
pkgs/top-level/python-packages.nix
···
venvShellHook
wheelUnpackHook;
-
pytestCheckHook_6_1 = self.pytestCheckHook.override { pytest = self.pytest_6_1; };
+
# Not all packages are compatible with the latest pytest yet.
+
# We need to override the hook to select an older pytest, however,
+
# it should not override the version of pytest that is used for say
+
# Python 2. This is an ugly hack that is needed now because the hook
+
# propagates the package.
+
pytestCheckHook_6_1 = if isPy3k then
+
self.pytestCheckHook.override { pytest = self.pytest_6_1; }
+
else
+
self.pytestCheckHook;
# helpers