Skip to content

Commit

Permalink
Fix unpickable configuration value when using autoapi_prepare_jinja_env
Browse files Browse the repository at this point in the history
Fixes #445
  • Loading branch information
AWhetter committed May 20, 2024
1 parent f23b079 commit 4ff4116
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions autoapi/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ def run_autoapi(app):
if app.config.autoapi_generate_api_docs:
sphinx_mapper_obj.output_rst(source_suffix=out_suffix)

# This function cannot be pickled into the Sphinx cache, so clear it.
# We won't need access to it again until a full rebuild is done anyway.
app.config.autoapi_prepare_jinja_env = None


def build_finished(app, exception):
if not app.config.autoapi_keep_files and app.config.autoapi_generate_api_docs:
Expand Down
1 change: 1 addition & 0 deletions docs/changes/445.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix unpickable configuration value warning when using autoapi_prepare_jinja_env

0 comments on commit 4ff4116

Please sign in to comment.