[env] fix pickled doctrees cache (#11939)

This commit is contained in:
Bénédikt Tran authored and GitHub committed 2024-03-14 10:22:51 +01:00
1 parent 12d523efdc
commit f3087e8405
2 files changed
+6

No files matched your search

+3
View File
@@ -90,6 +90,9 @@ Bugs fixed
Patch by Bénédikt Tran.
* #12008: Fix case-sensitive lookup of ``std:label`` names in intersphinx inventory.
Patch by Michael Goerz.
* #11474: Fix doctrees caching causing files not be rebuilt in some cases,
e.g., when :confval:`numfig` is ``True``.
Patch by Bénédikt Tran.
Testing
-------
+3
View File
@@ -265,6 +265,9 @@ class BuildEnvironment:
"""Obtains serializable data for pickling."""
__dict__ = self.__dict__.copy()
__dict__.update(app=None, domains={}, events=None) # clear unpickable attributes
# ensure that upon restoring the state, the most recent pickled files
# on the disk are used instead of those from a possibly outdated state
__dict__.update(_pickled_doctree_cache={})
return __dict__
def __setstate__(self, state: dict) -> None: