Skip to content

Commit

Permalink
Coerce invalid tuple values back to _Opt
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Apr 17, 2024
1 parent 982681b commit 0c06a50
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Bugs fixed

* Preload all themes defined via entry points.
Patch by Adam Turner.
* Fix a bad interaction between the ``'Furo'`` theme and the new-style for
configuration values.
Patch by Adam Turner.

Release 7.3.1 (released Apr 17, 2024)
=====================================
Expand Down
3 changes: 3 additions & 0 deletions sphinx/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,9 @@ def __getstate__(self) -> dict:
# create a picklable copy of ``self._options``
__dict__['_options'] = _options = {}
for name, opt in self._options.items():
if not isinstance(opt, _Opt) and isinstance(opt, tuple) and len(opt) <= 3:
# Fix for Furo's ``_update_default``.
self._options[name] = opt = _Opt(*opt)
real_value = getattr(self, name)
if not is_serializable(real_value):
if opt.rebuild:
Expand Down

0 comments on commit 0c06a50

Please sign in to comment.