This is a note to let you know that I've just added the patch titled docs: Fix the docs build with Sphinx 6.0 to the 4.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: docs-fix-the-docs-build-with-sphinx-6.0.patch and it can be found in the queue-4.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 0283189e8f3d0917e2ac399688df85211f48447b Mon Sep 17 00:00:00 2001 From: Jonathan Corbet <corbet@xxxxxxx> Date: Wed, 4 Jan 2023 10:47:39 -0700 Subject: docs: Fix the docs build with Sphinx 6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Jonathan Corbet <corbet@xxxxxxx> commit 0283189e8f3d0917e2ac399688df85211f48447b upstream. Sphinx 6.0 removed the execfile_() function, which we use as part of the configuration process. They *did* warn us... Just open-code the functionality as is done in Sphinx itself. Tested (using SPHINX_CONF, since this code is only executed with an alternative config file) on various Sphinx versions from 2.5 through 6.0. Reported-by: Martin Liška <mliska@xxxxxxx> Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: Jonathan Corbet <corbet@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- Documentation/sphinx/load_config.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/Documentation/sphinx/load_config.py +++ b/Documentation/sphinx/load_config.py @@ -3,7 +3,7 @@ import os import sys -from sphinx.util.pycompat import execfile_ +from sphinx.util.osutil import fs_encoding # ------------------------------------------------------------------------------ def loadConfig(namespace): @@ -25,7 +25,9 @@ def loadConfig(namespace): sys.stdout.write("load additional sphinx-config: %s\n" % config_file) config = namespace.copy() config['__file__'] = config_file - execfile_(config_file, config) + with open(config_file, 'rb') as f: + code = compile(f.read(), fs_encoding, 'exec') + exec(code, config) del config['__file__'] namespace.update(config) else: Patches currently in stable-queue which might be from corbet@xxxxxxx are queue-4.19/lib-notifier-error-inject-fix-error-when-writing-err.patch queue-4.19/libfs-add-define_simple_attribute_signed-for-signed-.patch queue-4.19/perf-script-python-remove-explicit-shebang-from-tests-attr.c.patch queue-4.19/debugfs-fix-error-when-writing-negative-value-to-ato.patch queue-4.19/docs-fix-the-docs-build-with-sphinx-6.0.patch