Description
Describe the bug
The 7.1.0 release is breaking the Furo theme; css_tag(css)
is causing a file to be attempted to be opened with ?digest=e6660623a769aa55fea372102b9bf3151b292993
added to it, which of course breaks.
File "D:\a\scikit-build-core\scikit-build-core\.nox\docs\Lib\site-packages\furo\theme\furo\base.html", line 62, in block 'regular_styles'
{{ css_tag(css) }}
File "D:\a\scikit-build-core\scikit-build-core\.nox\docs\Lib\site-packages\jinja2\sandbox.py", line 393, in call
return __context.call(__obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\a\scikit-build-core\scikit-build-core\.nox\docs\Lib\site-packages\sphinx\builders\html\__init__.py", line 1202, in css_tag
if checksum := _file_checksum(app.outdir, css.filename):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\a\scikit-build-core\scikit-build-core\.nox\docs\Lib\site-packages\sphinx\builders\html\__init__.py", line 1254, in _file_checksum
with open(path.join(outdir, filename), encoding='utf-8') as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 22] Invalid argument: 'D:\\a\\scikit-build-core\\scikit-build-core\\docs\\_build\\html\\_static/styles/furo.css?digest=e6660623a769aa55fea372102b9bf3151b292993'
If it's @pradyunsg's Furo's fault, I can open an issue there instead, but this looks like it's an issue with the checksum additions mentioned for 7.1.0? Especially since it only happens on Windows.
Seen in scikit-build/scikit-build-core#440 and scikit-build/scikit-build-core#441.
How to Reproduce
It's hard for me to test, since it's Windows only. Building Scikit-build-core's docs (via nox) on Windows would repeat it. I think any usage of Furo would break it, it doesn't seem to be specific, as it's loading a css file. Maybe other themes that have this construct.
Environment Information
GitHub Actions, windows-latest, with the latest sphinx.
Sphinx extensions
I think it can be done with just a theme.
Additional context
No response