Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'docs-6.2-fixes' of git://git.lwn.net/linux

Pull documentation fixes from Jonathan Corbet:
"Three documentation fixes (or rather two and one warning):

- Sphinx 6.0 broke our configuration mechanism, so fix it

- I broke our configuration for non-Alabaster themes; Akira fixed it

- Deprecate Sphinx < 2.4 with an eye toward future removal"

* tag 'docs-6.2-fixes' of git://git.lwn.net/linux:
docs/conf.py: Use about.html only in sidebar of alabaster theme
docs: Deprecate use of Sphinx < 2.4.x
docs: Fix the docs build with Sphinx 6.0

+15 -3
+11 -1
Documentation/conf.py
··· 31 31 # Get Sphinx version 32 32 major, minor, patch = sphinx.version_info[:3] 33 33 34 + # 35 + # Warn about older versions that we don't want to support for much 36 + # longer. 37 + # 38 + if (major < 2) or (major == 2 and minor < 4): 39 + print('WARNING: support for Sphinx < 2.4 will be removed soon.') 34 40 35 41 # If extensions (or modules to document with autodoc) are in another directory, 36 42 # add these directories to sys.path here. If the directory is relative to the ··· 345 339 346 340 # Custom sidebar templates, maps document names to template names. 347 341 # Note that the RTD theme ignores this 348 - html_sidebars = { '**': ["about.html", 'searchbox.html', 'localtoc.html', 'sourcelink.html']} 342 + html_sidebars = { '**': ['searchbox.html', 'localtoc.html', 'sourcelink.html']} 343 + 344 + # about.html is available for alabaster theme. Add it at the front. 345 + if html_theme == 'alabaster': 346 + html_sidebars['**'].insert(0, 'about.html') 349 347 350 348 # Output file base name for HTML help builder. 351 349 htmlhelp_basename = 'TheLinuxKerneldoc'
+4 -2
Documentation/sphinx/load_config.py
··· 3 3 4 4 import os 5 5 import sys 6 - from sphinx.util.pycompat import execfile_ 6 + from sphinx.util.osutil import fs_encoding 7 7 8 8 # ------------------------------------------------------------------------------ 9 9 def loadConfig(namespace): ··· 48 48 sys.stdout.write("load additional sphinx-config: %s\n" % config_file) 49 49 config = namespace.copy() 50 50 config['__file__'] = config_file 51 - execfile_(config_file, config) 51 + with open(config_file, 'rb') as f: 52 + code = compile(f.read(), fs_encoding, 'exec') 53 + exec(code, config) 52 54 del config['__file__'] 53 55 namespace.update(config) 54 56 else: