summaryrefslogtreecommitdiff
path: root/sphinx/util/parallel.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2019-12-01 15:19:25 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2019-12-01 16:01:19 +0900
commit6f529f01edee46be471a53e83dcfa6181654a883 (patch)
tree5dd1bd99885199b51a8a48e39766ce96ce68f20e /sphinx/util/parallel.py
parent9d3f537cbe07e83d6006a5ebe4334da4ed73460f (diff)
downloadsphinx-git-6f529f01edee46be471a53e83dcfa6181654a883.tar.gz
Fix #6803: Disable parallel build on macOS and py38+
Diffstat (limited to 'sphinx/util/parallel.py')
-rw-r--r--sphinx/util/parallel.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/sphinx/util/parallel.py b/sphinx/util/parallel.py
index 2d519a8d3..0ff0ec116 100644
--- a/sphinx/util/parallel.py
+++ b/sphinx/util/parallel.py
@@ -9,6 +9,8 @@
"""
import os
+import platform
+import sys
import time
import traceback
from math import sqrt
@@ -26,7 +28,12 @@ logger = logging.getLogger(__name__)
# our parallel functionality only works for the forking Process
-parallel_available = multiprocessing and (os.name == 'posix')
+#
+# Note: "fork" is not recommended on macOS and py38+.
+# see https://bugs.python.org/issue33725
+parallel_available = (multiprocessing and
+ (os.name == 'posix') and
+ not (sys.version_info > (3, 8) and platform.system() == 'Darwin'))
class SerialTasks: