Skip to content

Commit 4ff4116

Browse files
committed
Fix unpickable configuration value when using autoapi_prepare_jinja_env
Fixes #445
1 parent f23b079 commit 4ff4116

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

autoapi/extension.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ def run_autoapi(app):
141141
if app.config.autoapi_generate_api_docs:
142142
sphinx_mapper_obj.output_rst(source_suffix=out_suffix)
143143

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

145149
def build_finished(app, exception):
146150
if not app.config.autoapi_keep_files and app.config.autoapi_generate_api_docs:

docs/changes/445.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix unpickable configuration value warning when using autoapi_prepare_jinja_env

0 commit comments

Comments
 (0)