From nobody Sun Nov 24 16:09:21 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1722256574; cv=none; d=zohomail.com; s=zohoarc; b=mYEu03udc9Cv7RBfwDOv+03GtY1RIACkB46pgom5P6DUXAzCamvcHp+zd+v8qyRY208FQb31FxA0JzyVBbljExnjRG2gBMr3rV+vACv8wARuF9NVvoEL+OcwchqCWO6JW8+Dqp6J5nsbOaCuUm4dk11iK3S89bkz0fHmReuKYgM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722256574; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=v4OnXxLy+/uIGAva9okgt0HNd9KDzrdWo3Q0gkIoVtM=; b=EeMJHJHgqdEuJszXUM0UArJLLJT8I2izHGcXg68OPCVAMpBPjFqLBLgqPbGax6lMJN1zzdUgW70mWwIXzJlvUQfQ625b6QziYkevee/rVrjIMRhYdhuEaVEJYfDBw07YMWvjNrB0HmYlaS/AAsVMpJnv1+ZaevlupIae5t0hrpw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1722256574011288.8918034766691; Mon, 29 Jul 2024 05:36:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYP8H-0002AX-Bc; Mon, 29 Jul 2024 08:05:41 -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 1sYP8F-0002A1-T0 for qemu-devel@nongnu.org; Mon, 29 Jul 2024 08:05:40 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYP8D-0005J3-JN for qemu-devel@nongnu.org; Mon, 29 Jul 2024 08:05:39 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4266dc7591fso14541935e9.0 for ; Mon, 29 Jul 2024 05:05:36 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-428197f2597sm52968245e9.24.2024.07.29.05.05.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 05:05:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722254735; x=1722859535; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=v4OnXxLy+/uIGAva9okgt0HNd9KDzrdWo3Q0gkIoVtM=; b=l447vCDeIxIEwtFVEsTnswPIUH3gt//J4R1iGhoDi/PM8shLt3XwlXrWnYCbquvyjy V8lUOfpVeQAFoEJHFotQ2wgVrkHEHP+8hL1ndIYVKncLY7JrNf1ThhaLVif4U8Obj+RI c55ARpxs6SzSwdiTsMBgZuBj5jJwRA2wrewUqIQA4hDTbjHl3/knFFEUnlWPdW/zTbTr vOefjE/miDuyXZVV/PC7Xf/PeA2kfYhhsETvG6z/TnJXhZ+ujGKSwV75YnMymJb790vY 9PWCLOufZqGZsqmPidHWz6lFbfi4F4w7HZDn51TV+2M4ZAvc/ziBjXFh2V/m4J35fjuv lvTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722254735; x=1722859535; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=v4OnXxLy+/uIGAva9okgt0HNd9KDzrdWo3Q0gkIoVtM=; b=odgEjcDu5eJItpX6o6sv9X4cMuyZB9AucJ8m0SDTIMYi8wp7Cd/Cb05eF24aHMvj70 4AEtmhpASNBZcFmtLWw6ROdAMLkVt120bsVdtNCc1rVPS3YlQ06SCPhsmFDwq5wNZpKT 2v6jPiMWQHW+berSg2L51NMAJKwZHH89o+HMuRKVEDjY8YLJvA8rRqJ6VcBObhiMxoMz LUvOPk33KVq95Gc7nYd4RJWRjUeWAzuw12XOkbtHiUsZHZPfi8+Mbk7URsPsVl8VM5ox VBZ+eA+0wlLRCJwFW/71a9qszSD5ZtV3AMoDGcWptjlbNLB+QzWWaDJtss5unJfHsAfS WwDQ== X-Gm-Message-State: AOJu0YzClKFw/dLLRY1gfLgGmhIv+YItgxL0bXIS2HYi0qDyCOnjY5GJ 3tn/xlCHH1fWla+hBTY16ZO76EEGANtZecCTm6WydlDHk+tJukHGIlkGi0Xp8jLnmDfJRrg6OLm 5 X-Google-Smtp-Source: AGHT+IEXiWrssHey1a3fwVGlM0oZXx1v6XHFkl0gEvRQWFBuvoc6CrD8tI1KS07kEQEevtqOzQ+mlA== X-Received: by 2002:a05:600c:1f8f:b0:427:ffa4:32d0 with SMTP id 5b1f17b1804b1-42811dd6ae7mr47189575e9.28.1722254735352; Mon, 29 Jul 2024 05:05:35 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Paolo Bonzini Subject: [PATCH] docs/sphinx/depfile.py: Handle env.doc2path() returning a Path not a str Date: Mon, 29 Jul 2024 13:05:33 +0100 Message-Id: <20240729120533.2486427-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32b.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=ham 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722256576088116600 Content-Type: text/plain; charset="utf-8" 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-finish= ed' threw an exception (exception: unsupported operand type(s) for +: 'Posi= xPath' 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=C3=A9 --- 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 afdcbcec6e7..e74be6af98b 100644 --- a/docs/sphinx/depfile.py +++ b/docs/sphinx/depfile.py @@ -19,7 +19,7 @@ =20 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(): --=20 2.34.1