From patchwork Mon Jul 29 15:27:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 815034 Delivered-To: patch@linaro.org Received: by 2002:adf:b359:0:b0:367:895a:4699 with SMTP id k25csp1318979wrd; Mon, 29 Jul 2024 08:27:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWskAiU0nLcYDF0BcWKqfoQx45mFVoX8nHarXyxnCivgJTwpNzoYyBQzoamUnV1+qkT5c7634GZ17teaCu5ROzr X-Google-Smtp-Source: AGHT+IFoHwQG09Eiowp707+9+C7inmgc/+6nlBbiKh90XH8Yk2IbzHEiL5ZeSKguMn89yVFYlXRl X-Received: by 2002:a05:622a:1350:b0:447:e079:af12 with SMTP id d75a77b69052e-45004da2ff3mr108291561cf.19.1722266863234; Mon, 29 Jul 2024 08:27:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722266863; cv=none; d=google.com; s=arc-20160816; b=wMCXkpp+ywqWZDBwK4i9RmJXrpt3Vsh6AmciKpozE4c2cC5utsyfN7anY+x5N2e+0q eCfqsbxzNfH0cjJc4RbjcIp90SAl3kPhIxV2IFjqGVAn56KvFFwo60o7aIpfq4VLjqZ5 ETY0SDmjU+jQxzpuV0J+nBgt/vvJ7lbCt9AhQwAy4Pvulkeijy/jRIC/eu+zW28p8B87 0Ir7COl9uQ3a9B9J3ZHaV0+v6bRKFUxshxivLVjnm9iGwK+vOIkJHGDutRdk4C8ZVj8O akYiECUJqZXHZHqpFdODA0jM//TrueImBDpnhdYVFDwHPVoekWvBm4LSWiHm7DPMezfA A3UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=X07qTbL83zQOZhtssmu4m+yBs6p/aBS1K1qhIZAMOfc=; fh=LrPQuEKVF+Dsx2F4DCB8BVVQW8BdXsyh1KCq0lVL1mo=; b=si3wVbCJhv8/3VFUU83qiAQIWVk6xzulgdKUPmH85kA84o/695XGpoXn0no4ayTbSW hvPnoMYxd+yRLBA3BC+dokKQfN1MmG1OIMP6muaHMJFQhaQZLLoIcsFxKdPC3A9Zhke4 WNNWeKDBR0LffqVmga0ga46ZoKWHAHmNuJndAlOP/PfyD4qm4iD84KBTfwKKKR8n36ue qvur6/xXPftKLGyB1xcJCj8RjvTcEGzNaHJTF9FxDHSrENBQW6bN+mYVJUKDB+8OU2vY 5h/emB+1EOgrKyNE+CQ+RHbbZS/HCH9WVoxSCvmxMUwE9FDBc5ftyk+jaGxpfzk8/V91 0kxg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FejViZJr; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-44fe840853esi103822401cf.507.2024.07.29.08.27.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jul 2024 08:27:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FejViZJr; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYSHf-0000hm-FT; Mon, 29 Jul 2024 11:27:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sYSHe-0000eG-J2 for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:27:34 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYSHb-0008Et-J0 for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:27:34 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-427ffae0b91so23132135e9.0 for ; Mon, 29 Jul 2024 08:27:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722266850; x=1722871650; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=X07qTbL83zQOZhtssmu4m+yBs6p/aBS1K1qhIZAMOfc=; b=FejViZJrSDngSBRkiDR5RMhQ84XQHu8SdLms30SqjbdN9hANIlCAxQR/6PWaRnpWeD sggY/ClXqEjk94t8jlkyaJwalj6OY6c4vn9W4WWF0ZPaUWFGVfEjb4ijeHkvWc9CcO2i zSTmYVNnIxo/P/HYb6hA9Gs3kxD5WI6/ttVDoG8lJ980ljo94y94SQU3zi2LPFAQo8l4 9k+h4hdpig26qY9pfXADnzXa04UJJ1TqrlGK/t/mNsyZRnniBfhbAhEDyYvGOcbERbSF PLx0cMZ5EuyR/8uyBRFWsZA4jLhN4f3/XfZjRAPZ9uveaqEGlFTaG/IiHLLaJnhk8ttZ aqmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722266850; x=1722871650; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=X07qTbL83zQOZhtssmu4m+yBs6p/aBS1K1qhIZAMOfc=; b=Fg/glw4MS3IxdJTuCAdP0q1KSmLLpPD+Ou+++/D3vTGYmMSZZ4C/nsKrsQtgE81FXe u8AoJf0ATHsvX4Bjv0VbjZxCzJh80F96JrNBux5RnYdoDH1liolMSgbKYZi4LwOopxuy p6rJ1K/YhtDrP/2SiKYJ8JItZlFxpYSDtdHm2toUdqJ7gNLQN9G7d2k5dS1umVHrWoJ5 Ph3TrEwBprYFggFdlKpLfgSTLxeyR4Nz3krxcmpY0DWnZAnR0EjzSdqKrxRP5TSbptIE gOKYaewI0XchyUtFuqhgB8GfMV3zTlg1sw5ANTz7K6Pr9NBV7UMHSZhnssBSw06fSJG6 cKQg== X-Gm-Message-State: AOJu0YzfKquJz3K07678IXDfbpAGku7D5LgGyp/XiTnENWEsjqy2K7SK N5AQ6sz63XfY7/q0s3G3muTQ0j8HqVl532n/B0IMw/ogNDk0nw5i7V3z2vmOENfd8EANkCJLB+H b X-Received: by 2002:a05:600c:4e90:b0:426:59d3:8cae with SMTP id 5b1f17b1804b1-42811d8c44amr68772135e9.13.1722266849481; Mon, 29 Jul 2024 08:27:29 -0700 (PDT) Received: from localhost.localdomain ([176.176.173.10]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-428068cda0csm175854995e9.47.2024.07.29.08.27.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 29 Jul 2024 08:27:29 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-stable@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= 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 Message-ID: <20240729152714.10225-3-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729152714.10225-1-philmd@linaro.org> References: <20240729152714.10225-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Peter Maydell 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 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 Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240729120533.2486427-1-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- 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():