Skip to content

Fix unpickable configuration #396

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

Open
wants to merge 16 commits into
base: qlty
Choose a base branch
from
Open

Fix unpickable configuration #396

wants to merge 16 commits into from

Conversation

JokeWaumans
Copy link

No description provided.

JokeWaumans and others added 12 commits June 30, 2025 21:47
…lization

* Replace function object callbacks with string-based specifications to resolve
  Sphinx 7.3+ "unpicklable configuration value" warnings that prevent caching
* Add callback_utils module with intelligent function resolution:
  - Supports 'module.function_name' and bare 'function_name' formats
  - Automatically handles conf.py function lookup with proper path management
  - Maintains backward compatibility with deprecation warnings
* Update item directive to use new callback utility system
* Rename callback functions with '_func' suffix for clarity
* Add comprehensive test coverage for callback configuration

This change enables proper Sphinx document caching by using serializable
string specifications instead of function objects, following the same
approach as sphinx-gallery for identical Sphinx 7.3+ compatibility issues.

Fixes: Sphinx 7.3+ unpicklable configuration warnings
@JasperCraeghs JasperCraeghs changed the base branch from master to qlty July 17, 2025 17:29
@JasperCraeghs
Copy link
Member

sphinx-build without -E still doesn't use the saved environment. I will investigate the reason.

$ make -C doc html
make: Entering directory '/home/jce/git/sphinx-traceability-extension/doc'
sphinx-build -b html -d _build/doctrees  -j auto -T . _build/html
...
loading pickled environment... The configuration has changed (5 options: 'html_permalinks_icon', 'latex_elements', 'traceability_attribute_to_string', 'traceability_attributes', 'traceability_checklist')
done
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 0 source files that are out of date
updating environment: [config changed ('traceability_attributes')] 17 added, 0 changed, 0 removed
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants