Merge pull request #194308 from mweinelt/pytest-dont-fork-on-darwin

authored by Martin Weinelt and committed by GitHub f233449e 69ea4c86

+8
+8
pkgs/development/python-modules/pytest-xdist/setup-hook.sh
··· 3 3 "--numprocesses=$NIX_BUILD_CORES" 4 4 "--forked" 5 5 ) 6 + 7 + # Using --forked on darwin leads to crashes when fork safety is 8 + # enabled. This often happens when urllib tries to request proxy 9 + # settings on MacOS through `urllib.request.getproxies()` 10 + # - https://github.com/python/cpython/issues/77906 11 + if [[ "$OSTYPE" == "darwin"* ]]; then 12 + export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES 13 + fi 6 14 } 7 15 8 16 # the flags should be added before pytestCheckHook runs so