Declare the extension as parallel safe

Closes #222
pull/231/head
Ashley Whetter 4 years ago
parent 3faa27053b
commit f5182a2291

@ -6,6 +6,11 @@ Versions follow `Semantic Versioning <https://semver.org/>`_ (``<major>.<minor>.
TBC (TBC)
---------
Features
^^^^^^^^
* `#222 <https://github.com/readthedocs/sphinx-autoapi/issues/222>`:
Declare the extension as parallel safe.
Bug Fixes
^^^^^^^^^
* `#219 <https://github.com/readthedocs/sphinx-autoapi/issues/219>`:

@ -316,3 +316,8 @@ def setup(app):
app.add_event("autoapi-skip-member")
app.setup_extension("sphinx.ext.inheritance_diagram")
app.add_directive("autoapi-inheritance-diagram", AutoapiInheritanceDiagram)
return {
"parallel_read_safe": True,
"parallel_write_safe": True,
}

@ -23,7 +23,7 @@ from autoapi.mappers.python import (
def builder():
cwd = os.getcwd()
def build(test_dir, confoverrides=None):
def build(test_dir, confoverrides=None, **kwargs):
os.chdir("tests/python/{0}".format(test_dir))
app = Sphinx(
srcdir=".",
@ -32,6 +32,7 @@ def builder():
doctreedir="_build/.doctrees",
buildername="text",
confoverrides=confoverrides,
**kwargs
)
app.build(force_all=True)
@ -639,6 +640,12 @@ class TestComplexPackage(object):
assert "unicode_str" in foo_file
class TestComplexPackageParallel(object):
@pytest.fixture(autouse=True, scope="class")
def built(self, builder):
builder("pypackagecomplex", parallel=2)
@pytest.mark.skipif(
sys.version_info < (3, 3), reason="Implicit namespace not supported in python < 3.3"
)

Loading…
Cancel
Save