Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ubmarco committed Oct 23, 2023
1 parent 7a39110 commit 070aab6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sphinx/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ def __init__(self, name: str, module: Any, **kwargs: Any) -> None:
# the extension does not tell its status.
self.parallel_write_safe = kwargs.pop('parallel_write_safe', True)

# The extension supports parallel post-transform or not. The default value
# is ``True``. Sphinx post-transforms documents in parallel even if
# the extension does not tell its status. This is acceptable as
# post transformations and doctree-resolved events commonly don't update
# the environment for build-finished steps. They only act on the documents
# currently processed. Any extension that wants to preserve the environment
# of the post-transform step for build-finished can actively disable this.
# Parallel post-transformation shifts heavy loads from the main process to
# subprocesses which can speed up build time by a factor of 2.5 on big projects.
self.parallel_post_transform_safe = kwargs.pop('parallel_post_transform_safe', True)

def verify_needs_extensions(app: Sphinx, config: Config) -> None:
"""Check that extensions mentioned in :confval:`needs_extensions` satisfy the version
Expand Down

0 comments on commit 070aab6

Please sign in to comment.