Fixes #6180
Some checks failed
/ build (macos-latest, 3.8) (push) Has been cancelled
/ build (ubuntu-latest, pypy-2.7) (push) Has been cancelled
/ build (windows-latest, 3.14) (push) Has been cancelled

This commit is contained in:
Miroslav Štampar 2026-11-10 15:10:16 +01:00
parent 397a3bde2e
commit eca9ff2e13
2 changed files with 3 additions and 2 deletions

View file

@ -1380,7 +1380,8 @@ def dictionaryAttack(attack_dict):
else:
try:
if multiprocessing.cpu_count() > 1:
_multiprocessing = multiprocessing
# Note: 'forkserver' (POSIX default since Python 3.14) re-imports the main script, which breaks for pip installs (#6180)
_multiprocessing = multiprocessing.get_context("fork") if "fork" in getattr(multiprocessing, "get_all_start_methods", lambda: ())() else multiprocessing
except NotImplementedError:
pass