Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👌 Add warning log for config values that cannot be cached #12203

Merged
merged 9 commits into from
Mar 27, 2024

Conversation

chrisjsewell
Copy link
Member

@chrisjsewell chrisjsewell commented Mar 25, 2024

As a user and/or extension developer, it can be a source of confusion when, on performing a sphinx-build on a cached project, an unchanged configuration variable is always marked as changed (which then triggers a full rebuild).

This is often due to the variable being an unpicklable value, like a function, which is silently omitted from the cache (i.e. the environment.pickle).

This PR introduces a specific warning for when a configuration variable is omitted from the cache, allowing users to understand the root of the problem.

sphinx/config.py Outdated Show resolved Hide resolved
sphinx/config.py Show resolved Hide resolved
tests/test_config/test_config.py Outdated Show resolved Hide resolved
Co-authored-by: Bénédikt Tran <[email protected]>
tests/test_config/test_config.py Outdated Show resolved Hide resolved
tests/test_config/test_config.py Outdated Show resolved Hide resolved
@chrisjsewell
Copy link
Member Author

chrisjsewell commented Mar 27, 2024

The test failures appear to be unrelated to this PR, or perhaps a result of poor test isolation?

edit: commented out the test and it is still failing, so seems some side-effect of the latest python release: Python 3.13.0a5+ (main, Mar 27 2024, 08:49:34) [GCC 11.4.0]

@picnixz
Copy link
Member

picnixz commented Mar 27, 2024

The test failures appear to be unrelated to this PR, or perhaps a result of poor test isolation?

edit: commented out the test and it is still failing, so seems some side-effect of the latest python release: Python 3.13.0a5+ (main, Mar 27 2024, 08:49:34) [GCC 11.4.0]

For posterity: python/cpython#115913

bilke pushed a commit to ufz/ogstools that referenced this pull request Apr 25, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 30, 2024
@AA-Turner AA-Turner added this to the 7.3.0 milestone Jul 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants