sphinx icon indicating copy to clipboard operation
sphinx copied to clipboard

Do not add checksums to css files if building using the htmlhelp builder

Open mkay-sh opened this issue 1 year ago • 4 comments

Subject: The windows help compiler requires that css links don't have a query component. This PR disables the checksum for css files if the htmlhelp builder is used.

Feature or Bugfix

  • Bugfix

Relates

  • Fixes #11889

mkay-sh avatar Jan 18 '24 12:01 mkay-sh

Please could you add an entry to CHANGES?

AA-Turner avatar Jan 18 '24 21:01 AA-Turner

This looks like it affects Sphinx 7.1.0 onwards currently, and I do think that this would solve the problem.

However: it's not great to introduce builder-specific fixes in Sphinx itself, and I'd suggest that maybe adding a crc32_checksum attribute (default True, overridden as False in the sphinxcontrib-htmlhelp builder) to the base HTML builder -- since that's the top-level at which this feature is relevant -- could be an alternative. (I considered a generic checksum attribute name -- but I think that there are other checksum/integrity methods we might want to consider in future, hence trying to avoid a future naming conflict)

That said: that would require some release co-ordination (addition + release in Sphinx, then a corresponding usage + baseline Sphinx dependency bump + release of sphinxcontrib-htmlhelp) - so so it's possible that I'm suggesting more work than is practically worthwhile.

jayaddison avatar Jan 18 '24 21:01 jayaddison

Ok: now I understand that as of recently, many of the sphinxcontrib-* extensions no longer have Python package dependency references back to Sphinx itself. So in the short term, my alternative suggestion (implement an attribute in Sphinx, release, update the baseline dep in the extension, then release that) is not valid.

I'll try to learn a bit more about the reasoning behind the dependency versioning change (#11567); to my mind, the ability to list supported Sphinx versions from each extensions seems quite important.

jayaddison avatar Jan 19 '24 12:01 jayaddison

I think my previous comments here were too hasty and cautious about this - I now think it's a reasonable solution to a genuine problem, and that unless another approach arrives (that I could and should offer myself if I find time), on balance it's better to fix the existing issue. My apologies for delay caused.

jayaddison avatar Feb 15 '24 17:02 jayaddison

Please could you add an entry to CHANGES?

I added an entry to the changes.

mkay-sh avatar Mar 15 '24 08:03 mkay-sh

Thank you! I'll merge it when the tests are done

picnixz avatar Mar 15 '24 08:03 picnixz

Thank you!

picnixz avatar Mar 15 '24 08:03 picnixz