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

Messaging improvement: mention template evaluation during file copying #11328

Closed
jayaddison opened this issue Apr 15, 2023 · 0 comments · Fixed by #12726
Closed

Messaging improvement: mention template evaluation during file copying #11328

jayaddison opened this issue Apr 15, 2023 · 0 comments · Fixed by #12726
Milestone

Comments

@jayaddison
Copy link
Contributor

Describe the bug

The messaging of copying static files can be inaccurate in cases where Sphinx copies content that includes templated files (because those are evaluated by jinja and the results are written instead of the original template's contents).

This may be rare, but it's particularly incongruous messaging when builds treat warnings as failures, as seen here: https://github.com/astropy/sphinx-automodapi/actions/runs/4694556705/jobs/8322825594#step:8:170

copying static files... failed
...
Failed to copy a file in html_static_file: /home/runner/work/sphinx-automodapi/sphinx-automodapi/.tox/py310-test-sphinxdev/lib/python3.10/site-packages/alabaster/static/alabaster.css_t: OldJinjaSuffixWarning("'/home/runner/work/sphinx-automodapi/sphinx-automodapi/.tox/py310-test-sphinxdev/lib/python3.10/site-packages/alabaster/static/alabaster.css_t': the '_t' suffix for Jinja templates is deprecated. If the file is a template, use the suffix '.jinja' instead. For more information, see https://www.sphinx-doc.org/en/master/development/theming.html#static-templates")

As a possible improvement I'd suggest copying static files and evaluating Jinja templates.

How to Reproduce

Invoking the sphinx-build -b html . _build command to build a Sphinx project as HTML emits this message as part of the output.

Environment Information

Platform:              linux; (Linux-6.1.0-7-amd64-x86_64-with-glibc2.36)
Python version:        3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0])
Python implementation: CPython
Sphinx version:        6.2.0+/b6e6805f8
Docutils version:      0.19
Jinja2 version:        3.1.2
Pygments version:      2.15.0

Sphinx extensions

N/A

Additional context

Localisation of the updated message will be required.

@AA-Turner AA-Turner added this to the some future version milestone Apr 29, 2023
@jayaddison jayaddison changed the title html builder: messaging improvement: mention template evaluation during file copying Messaging improvement: mention template evaluation during file copying Aug 1, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 11, 2024
@AA-Turner AA-Turner modified the milestones: some future version, 8.1.0 Oct 6, 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 a pull request may close this issue.

2 participants