python310Packages.pytest-xdist: 2.5.0 -> 3.1.0

https://github.com/pytest-dev/pytest-xdist/blob/v3.1.0/CHANGELOG.rst
This commit is contained in:
Robert Schütz 2022-11-10 12:05:18 -08:00 committed by Martin Weinelt
parent 6d9c724458
commit 44f365a931
2 changed files with 23 additions and 17 deletions

View file

@ -7,32 +7,47 @@
, filelock
, execnet
, pytest
, pytest-forked
, psutil
, pexpect
, setproctitle
}:
buildPythonPackage rec {
pname = "pytest-xdist";
version = "2.5.0";
version = "3.1.0";
disabled = pythonOlder "3.6";
format = "pyproject";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-RYDeyj/wTdsqxT66Oddstd1e3qwFDLb7x2iw3XErTt8=";
hash = "sha256-QP2481RJIcXfzUhqwIDOIocOcdgs7W0uePqXwq3dSAw=";
};
nativeBuildInputs = [ setuptools-scm ];
nativeBuildInputs = [
setuptools-scm
];
buildInputs = [
pytest
];
checkInputs = [ pytestCheckHook filelock pexpect ];
propagatedBuildInputs = [ execnet pytest-forked psutil ];
propagatedBuildInputs = [
execnet
];
checkInputs = [
filelock
pytestCheckHook
];
passthru.optional-dependencies = {
psutil = [ psutil ];
setproctitle = [ setproctitle ];
};
pytestFlagsArray = [
# pytest can already use xdist at this point
"--numprocesses=$NIX_BUILD_CORES"
"--forked"
];
# access file system

View file

@ -1,16 +1,7 @@
pytestXdistHook() {
pytestFlagsArray+=(
"--numprocesses=$NIX_BUILD_CORES"
"--forked"
)
# Using --forked on darwin leads to crashes when fork safety is
# enabled. This often happens when urllib tries to request proxy
# settings on MacOS through `urllib.request.getproxies()`
# - https://github.com/python/cpython/issues/77906
if [[ "$OSTYPE" == "darwin"* ]]; then
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
fi
}
# the flags should be added before pytestCheckHook runs so