Skip to content

Commit

Permalink
Ignore sphinx warning about unpickable cache (#7400)
Browse files Browse the repository at this point in the history
[Sphinx 7.3.0][1] introduce a new warning about not being able to pickle
a config value. I think the function `plotly_sg_scraper` in
`sphinx_gallery_conf` is triggering this. If I read azure-pipelines.yml
correctly we are not preserving Sphinx's cache between runs anyway. So
we should be fine to just ignore this warning.

These new [config options][2] also require Sphinx 7.3.0.

[1]: https://www.github.com/sphinx-doc/sphinx/issues/12300
[2]: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-show_warning_types
  • Loading branch information
lagru committed Apr 18, 2024
1 parent c012462 commit 3487d3a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@
templates_path = ["_templates"]
source_suffix = ".rst"

show_warning_types = True
suppress_warnings = [
# Ignore new warning in Sphinx 7.3.0 while pickling environment:
# WARNING: cannot cache unpickable configuration value: 'sphinx_gallery_conf'
"config.cache",
]

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ developer = [
"tomli; python_version < '3.11'",
]
docs = [
'sphinx>=7.2',
'sphinx>=7.3',
'sphinx-gallery>=0.14',
'numpydoc>=1.7',
'sphinx-copybutton',
Expand Down
2 changes: 1 addition & 1 deletion requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated via tools/generate_requirements.py and pre-commit hook.
# Do not edit this file; modify pyproject.toml instead.
sphinx>=7.2
sphinx>=7.3
sphinx-gallery>=0.14
numpydoc>=1.7
sphinx-copybutton
Expand Down

0 comments on commit 3487d3a

Please sign in to comment.