From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
qemu-stable@nongnu.org,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PULL 02/14] docs/sphinx/depfile.py: Handle env.doc2path() returning a Path not a str
Date: Mon, 29 Jul 2024 17:27:02 +0200 [thread overview]
Message-ID: <20240729152714.10225-3-philmd@linaro.org> (raw)
In-Reply-To: <20240729152714.10225-1-philmd@linaro.org>
From: Peter Maydell <peter.maydell@linaro.org>
In newer versions of Sphinx the env.doc2path() API is going to change
to return a Path object rather than a str. This was originally visible
in Sphinx 8.0.0rc1, but has been rolled back for the final 8.0.0
release. However it will probably emit a deprecation warning and is
likely to change for good in 9.0:
https://github.com/sphinx-doc/sphinx/issues/12686
Our use in depfile.py assumes a str, and if it is passed a Path
it will fall over:
Handler <function write_depfile at 0x77a1775ff560> for event 'build-finished' threw an exception (exception: unsupported operand type(s) for +: 'PosixPath' and 'str')
Wrapping the env.doc2path() call in str() will coerce a Path object
to the str we expect, and have no effect in older Sphinx versions
that do return a str.
Cc: qemu-stable@nongnu.org
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2458
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240729120533.2486427-1-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
docs/sphinx/depfile.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/sphinx/depfile.py b/docs/sphinx/depfile.py
index afdcbcec6e..e74be6af98 100644
--- a/docs/sphinx/depfile.py
+++ b/docs/sphinx/depfile.py
@@ -19,7 +19,7 @@
def get_infiles(env):
for x in env.found_docs:
- yield env.doc2path(x)
+ yield str(env.doc2path(x))
yield from ((os.path.join(env.srcdir, dep)
for dep in env.dependencies[x]))
for mod in sys.modules.values():
--
2.45.2
next prev parent reply other threads:[~2024-07-29 15:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-29 15:27 [PULL 00/14] Docs / testing patches for 2024-07-29 Philippe Mathieu-Daudé
2024-07-29 15:27 ` [PULL 01/14] docs: add test for firmware.json QAPI Philippe Mathieu-Daudé
2024-07-29 15:27 ` Philippe Mathieu-Daudé [this message]
2024-07-29 15:27 ` [PULL 03/14] python: Install pycotap in our venv if necessary Philippe Mathieu-Daudé
2024-07-29 15:27 ` [PULL 04/14] tests/functional: Add base classes for the upcoming pytest-based tests Philippe Mathieu-Daudé
2024-07-29 15:27 ` [PULL 05/14] tests/Makefile.include: Increase the level of indentation in the help text Philippe Mathieu-Daudé
2024-07-29 15:27 ` [PULL 06/14] tests/functional: Prepare the meson build system for the functional tests Philippe Mathieu-Daudé
2024-07-29 15:27 ` [PULL 07/14] tests/functional: Convert simple avocado tests into standalone python tests Philippe Mathieu-Daudé
2024-07-29 15:27 ` [PULL 08/14] tests/functional: Convert avocado tests that just need a small adjustment Philippe Mathieu-Daudé
2024-07-29 15:27 ` [PULL 09/14] tests/functional: Convert the x86_cpu_model_versions test Philippe Mathieu-Daudé
2024-07-29 15:27 ` [PULL 10/14] tests/functional: Convert the riscv_opensbi avocado test into a standalone test Philippe Mathieu-Daudé
2024-07-29 15:27 ` [PULL 11/14] gitlab-ci: Add "check-functional" to the build tests Philippe Mathieu-Daudé
2024-07-29 15:27 ` [PULL 12/14] tests/avocado: mips: fallback to HTTP given certificate expiration Philippe Mathieu-Daudé
2024-07-29 15:27 ` [PULL 13/14] tests/avocado: mips: add hint for fetchasset plugin Philippe Mathieu-Daudé
2024-07-29 15:27 ` [PULL 14/14] tests/avocado: test_arm_emcraft_sf2: handle RW requirements for asset Philippe Mathieu-Daudé
2024-07-29 15:36 ` [PULL 00/14] Docs / testing patches for 2024-07-29 Daniel P. Berrangé
2024-07-30 10:04 ` Philippe Mathieu-Daudé
2024-07-30 10:14 ` Peter Maydell
2024-07-30 18:31 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240729152714.10225-3-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).