readthedocs / sphinx-autoapi

A new approach to API documentation in Sphinx.
https://sphinx-autoapi.readthedocs.io/
MIT License
415 stars 126 forks source link

Addressing Warning ``unpickable configuration value`` with Sphinx 7.3.7 Update #445

Closed Revathyvenugopal162 closed 1 month ago

Revathyvenugopal162 commented 1 month ago

Issue Description:

With the recent update to Sphinx 7.3.7, the addition of

prepare_jinja_env(jinja_env) -> None: 
              jinja_env.globals["project_name"] = project 
autoapi_prepare_jinja_env = prepare_jinja_env 

is generating the warning: "WARNING: cannot cache unpickable configuration value: 'autoapi_prepare_jinja_env' (because it contains a function, class, or module object)."

To address this issue, users can add config.cache to suppress the warning in our conf.py. However, it would be beneficial to address this on your end, especially when autoapi_prepare_jinja_env is involved, rather than requiring users to add it individually to each conf.py file.

Steps to Reproduce:

  1. Update to Sphinx 7.3.7.
  2. Observe the warning message related to unpickable configuration value.

Linked Pull Request:

Pull Request #121