readthedocs / sphinx-autoapi

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

Configuration callback is causing warnings with sphinx >= 7.3.0 #438

Closed dhalbert closed 2 months ago

dhalbert commented 2 months ago

Starting with sphinx 7.3.0 (released April 16) or maybe 7.3.1, our readthedocs jobs are failing due to this warning:

pickling environment... WARNING: cannot cache unpickable configuration value: 'autoapi_prepare_jinja_env'

(example: https://readthedocs.org/projects/circuitpython/builds/24090704/)

The autoapi_prepare_jinja_env() def is here: https://github.com/adafruit/circuitpython/blob/c978768d37faf3a9adee640e5d6ce991aa46aee9/conf.py#L113C5-L113C30

autoapi_prepare_jinja_env is documented here.

I am not sure whether this is an autoapi or a sphinx problem. Sphinx is churning a lot: it is already up to 7.3.4 on April 17.

dhalbert commented 2 months ago

This is a manifestation of the sphinx issue here: https://github.com/sphinx-doc/sphinx/issues/12300. So it's not an autoapi issue.

The workaround is https://github.com/sphinx-doc/sphinx/issues/12300#issuecomment-2061022198:

suppress_warnings = ["config.cache"]