From 3e2f41196e0ba083805aa32079e58e80fb29ebed Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Thu, 2 Nov 2023 11:28:36 -0400 Subject: [PATCH] add general warning to use of fork, revert installation tips since Alessio has PR fix --- .github/workflows/installation-tips-test.yml | 2 +- src/spikeinterface/core/job_tools.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/installation-tips-test.yml b/.github/workflows/installation-tips-test.yml index ce4a9d16ec..d4529bdaff 100644 --- a/.github/workflows/installation-tips-test.yml +++ b/.github/workflows/installation-tips-test.yml @@ -36,4 +36,4 @@ jobs: run: python ./installation_tips/check_your_install.py --ci # ci flag turns off gui - name: Windows cleanup if: ${{ matrix.label == 'windows' }} - run: python ./installation_tips/cleanup_for_windows.py + run: python .installation_tips/cleanup_for_windows.py diff --git a/src/spikeinterface/core/job_tools.py b/src/spikeinterface/core/job_tools.py index 3c6106084a..f94490986f 100644 --- a/src/spikeinterface/core/job_tools.py +++ b/src/spikeinterface/core/job_tools.py @@ -333,8 +333,10 @@ def __init__( mp_context = recording.get_preferred_mp_context() if mp_context is not None and platform.system() == "Windows": assert mp_context != "fork", "'fork' mp_context not supported on Windows!" - elif mp_context is not None and platform.system() == "Darwin": - warnings.warn('As of Python 3.8 "fork" is no longer considered safe on MacOS') + elif mp_context == "fork" and platform.system() == "Darwin": + warnings.warn('As of Python 3.8 "fork" is no longer considered safe on macOS') + elif mp_context == "fork": + warnings.warn('Use of "fork" will be deprecated in Python. Consider "spawn" in the future') self.mp_context = mp_context