-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
Windows v3.10.3 .chm file (in python310\doc) page headings are messed up and spread out over several lines. Also the font has changed from the former san serif font to a smaller and harder to read serif font. #91207
Comments
I guess for 3.11 we should just switch to loose HTML files and using the default browser, rather than fighting with dead CHM tools. No idea what may have caused this. Has anyone tried analysing the file for unsupported JavaScript or something? I think that's what caused it last time. Maybe Sphinx got an update and is using unsupported CSS? |
Doesn't seem to be any relevant changes in the repo between v3.10.2 and v3.10.3, and the theme hasn't changed. Obviously the HTMLHelp tools haven't changed in a decade or so, and the only difference in the build logs looks like less errors in the later one (apparently index terms didn't get fixed up properly in 3.10.2). So other than running the build again and hoping (which we'll likely be doing later this week anyway), doesn't seem to be anything that can be fixed here. |
The problem is caused by this change: |
Well spotted! If someone figures out where that's coming from, we can definitely backport a fix so that the next round of 3.9 and 3.10 updates have working docs (the CHM is already gone for 3.11, so it doesn't matter there). |
The The fingerprinting was added in python/python-docs-theme/pull/79 , to fix the caching issue in python/python-docs-theme#78 . However, it could be disabled in the The 3.9 branch is built, so it might be stuck with it absent special provisions to fix this. @JulienPalard any thoughts here? |
We should be able to conditionally disable it when the target is |
Oh yeah, of course, since its a theme setting and I could go ahead with that, unless anyone else has a better idea? |
It looks like at least the standard docs build passes it as |
Good catch. It only ended up being a fraction more complicated, |
Thanks for the fix, I checked and it works fine. We probably ought to forward port it as well, since the build script is still there. But maybe there's a better hack we could use instead? Maybe an explicit option or env var for it? |
Not sure if you mean the
Unless there's some way to get legacy Windows Help to ignore a Instead of parsing def hardcode_stylesheet_htmlhelp(app):
if getattr(app.builder, 'name', None) == 'htmlhelp':
app.env.config.html_style = 'pydoctheme.css'
def setup(app):
app.connect('builder-inited', hardcode_stylesheet_htmlhelp) Assuming that works, but it adds complexity to support a fairly obsolete use can and there isn't a practical benefit over the existing two-liner. The main thing that would be ideal to avoid is hardcoding the name of the stylesheet from the theme, as opposed to reading the existing value, stripping the fingerprint and setting that instead, but at least poking around with Sphinx I couldn't find a way to easily retrieve the theme config, short of truly awful hacks like importing the theme module, getting its |
The build script is the path in I agree that the current fix is just as good as the longer one you proposed, so let's just forward port it to newer versions. Maybe we can also print out a "CHM is no longer supported - may be removed in future" message? |
Thanks, opened #95607 with those changes as requested 👍 |
…ion message (pythonGH-95607) (cherry picked from commit ac3bf61) Co-authored-by: CAM Gerlach <[email protected]>
…ssage (GH-95607) (cherry picked from commit ac3bf61) Co-authored-by: CAM Gerlach <[email protected]>
Awesome. Glad to close this one (though also happy to have moved on from CHM already) |
Thanks for guiding this along, @zooba ! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: