mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #6803: Disable parallel build on macOS and py38+
This commit is contained in:
parent
9d3f537cbe
commit
6f529f01ed
4
CHANGES
4
CHANGES
@ -7,6 +7,9 @@ Dependencies
|
||||
Incompatible changes
|
||||
--------------------
|
||||
|
||||
* #6803: For security reason of python, parallel mode is disabled on macOS and
|
||||
Python3.8+
|
||||
|
||||
Deprecated
|
||||
----------
|
||||
|
||||
@ -19,6 +22,7 @@ Bugs fixed
|
||||
* #6776: LaTeX: 2019-10-01 LaTeX release breaks :file:`sphinxcyrillic.sty`
|
||||
* #6815: i18n: French, Hindi, Japanese and Korean translation messages has been
|
||||
broken
|
||||
* #6803: parallel build causes AttributeError on macOS and Python3.8
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
import os
|
||||
import pickle
|
||||
import platform
|
||||
import sys
|
||||
import warnings
|
||||
from collections import deque
|
||||
@ -199,6 +200,12 @@ class Sphinx:
|
||||
# say hello to the world
|
||||
logger.info(bold(__('Running Sphinx v%s') % sphinx.__display_version__))
|
||||
|
||||
# notice for parallel build on macOS and py38+
|
||||
if sys.version_info > (3, 8) and platform.system() == 'Darwin' and parallel > 1:
|
||||
logger.info(bold(__("For security reason, parallel mode is disabled on macOS and "
|
||||
"python3.8 and above. For more details, please read "
|
||||
"https://github.com/sphinx-doc/sphinx/issues/6803")))
|
||||
|
||||
# status code for command-line application
|
||||
self.statuscode = 0
|
||||
|
||||
|
@ -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:
|
||||
|
@ -10,6 +10,8 @@
|
||||
|
||||
import codecs
|
||||
import os
|
||||
import platform
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
from docutils import nodes
|
||||
@ -276,6 +278,8 @@ def test_colored_logs(app, status, warning):
|
||||
|
||||
|
||||
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
|
||||
@pytest.mark.xfail(platform.system() == 'Darwin' and sys.version_info > (3, 8),
|
||||
reason="Not working on macOS and py38")
|
||||
def test_logging_in_ParallelTasks(app, status, warning):
|
||||
logging.setup(app, status, warning)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
Loading…
Reference in New Issue
Block a user