Skip to content

Conversation

@agoose77
Copy link
Collaborator

@agoose77 agoose77 commented Dec 12, 2023

Sphinx 7.26 (approximately) deprecates implicit string operations on the contents of context['css_files']. This, in turn, raises warnings for users that enable strict warning checks. This was observed in jupyter-book's test-suite.

This PR updates our handling to first assume objects within this list are _CascadingStyleSheet objects, and replaces the object back on the path.

choldgraf
choldgraf previously approved these changes Dec 12, 2023
Copy link
Member

@choldgraf choldgraf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me - a minor nitpick but LGTM regardless.

Should double-check that the "unexpected warnings" test failure is real or not though

if app.config.html_theme == "sphinx_book_theme":
assets.append("styles/sphinx-book-theme.css")
hash_assets_for_files(assets, get_html_theme_path() / "static", context)
hash_assets_for_files(assets, get_html_theme_path() / "static", context, app)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is public, but I can't imagine anyone using it. Are you happy with the breaking change?

@agoose77 agoose77 merged commit d9623d6 into master Dec 14, 2023
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.

3 participants