From patchwork Tue Jul 30 22:19:53 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: 815336 Delivered-To: patch@linaro.org Received: by 2002:a5d:4acf:0:b0:367:895a:4699 with SMTP id y15csp496219wrs; Tue, 30 Jul 2024 15:20:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUojnNsvqPlrWl0mrZF/S0xsIJuVqHFQoNA+vsqupZFLIo/TvlS+BH4nNJsQcZLLIOBvCW0BU3EqJsSpeGy9U5L X-Google-Smtp-Source: AGHT+IEpA95w9pAY2mtAc5FN/GF9p2VkrZJJ2nHF5e+o0HDaetULi82/BvbE8F47Tlaot0bnmA6M X-Received: by 2002:a05:6808:bd5:b0:3da:a16e:1750 with SMTP id 5614622812f47-3db23a2ded5mr17059784b6e.33.1722378049962; Tue, 30 Jul 2024 15:20:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722378049; cv=none; d=google.com; s=arc-20160816; b=zlJMQJo1png+3WLAhYDpGDJV/aydRYiqc4A05s5KUDD8PJTm2WR98nHhCz+YCM0KC0 DPY4lxhA7qRUSZPKz5V/hQ7GCfhpV/Wahoqi2MAnE471DSe4+XaLVvy8l/3gFVRQLlgG 6xXEopkTjw9DWwqmKBghXc3eeb3beGhxHDGktxuJd6bWLGj44CzDCtBE29Uj7ICV2K4s S1qI25sLnRifKcfSPXBisLgZ5SQ4HUjODr4ZfjAMchzgwn+Wc4+QJh0MmdMLAnnHVX3z Ktj6jyIyBus40J4G575gEHnW0kKskvv8VH+NI0vbFlVFpPi44NyZIez+U/BDGJVacylj oGGw== 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=ENWFINj6lA1GCFL7QEzAEy17eZvzNWTfWC31HOtH8Sp+r9WqigS3Gcs/0N+BP3qomI bUgrqJ9DGbgCrW5Kp2zELFa7Jeogb6NnyYfdW9OE3TgYn9C/Fa9n4TOb8OlGHAmzZ8Ie hkbimFieaPQ51qpGHkCrVFfcIT5HuIh8gu9IDHfCeDVLNr2+wvAQu9+lCMYKTW2Yf26i vAGfJG6pDMCM+9Y92szQ12C3hLNLHFFBnJ5ZzsF/Vu7DknTmKqa7H5GSJNa6ahW4E+Ye 4NbJnljrkU+fQVo5ob2ku/07evlgC0yXTXy4nk2UQ3iVHzB0HHBPbdGvsyI2/ZTiXbOv RJkA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RflqPW2N; 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-44fe8137506si137526331cf.122.2024.07.30.15.20.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jul 2024 15:20:49 -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=RflqPW2N; 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 1sYvCY-0005hI-RB; Tue, 30 Jul 2024 18:20:14 -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 1sYvCX-0005bu-GS for qemu-devel@nongnu.org; Tue, 30 Jul 2024 18:20:13 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYvCU-0006i6-WD for qemu-devel@nongnu.org; Tue, 30 Jul 2024 18:20:13 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4281e3b2f72so22163015e9.1 for ; Tue, 30 Jul 2024 15:20:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722378009; x=1722982809; 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=RflqPW2N+9sf1OruQg05FI3DZV7I+94gqUw6UdU/b6VH2GeJNdj/bm6izkxBbn5q6N GFF5QmnQNggF4xyBaJMjsF2ROsaTfYxqhHJ5h+AOCJAfkRL+JkNL4G8OILVjtio8AA51 S6ibcYfZ7H0eggrbc4r1tPBzGLqHUTGo0VnH0HSxEQVJi8qm1o/+bm9AdgT70YXdk4jn sWG2azUuBGAn6c2hB4MokunT0k0W3Xu/kFh4JrTs7OmDp7ycrLoz4DTpDGkAgcVEZYm0 Hi4tEXZAxSEvuy6GLw2gC7u6TNjd3kdI8w+eLckLKjhengZHdqq9sIA/xs0XfBQKo9HH zdaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722378009; x=1722982809; 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=s6q4g2nsixoyz6RNRj2kxyrl2i0CPOMzRA9ZRZGP4GYxm8SExJRwA/jb6Pyu/0LCI/ 8PI0ItV45HCCOfS9Z2Vn853EC0beDjZgMyHW2LnFJZcJ17hpHhCqMdJOyJTIQYdYKuBT S3703zRfqoAPiyDUrTW76hHw0iQsLxyG9BMe6nvkcNaIlYfUNKfGWQYpqFlsc9lL1x70 2/vNSSqAWMmteisSZFvo9gG9Oa1G8Acrv47dTo5d3z79EVcNda3F+58Fa+r/2hyqEuhB haDCARruvaG27C3/QEeVstXFEA+VNWnfnRjoM3KVGtKJ4wM5/xW0UeYMkXSQI+Oc6FVG 4Wsw== X-Gm-Message-State: AOJu0YyxrcA2nvshyAu2QuyY61tBDNDfBw7KW0EX6G3lsYnMch7ofFN5 ew6OWlFAbnrtK/gC6Y46gjlM9huh51Jh0bqSzwlUQ10SjQjqhHx1yKxHL6hBY+MRm9PzM+eB9PP MdXU= X-Received: by 2002:adf:f147:0:b0:367:95e8:3aef with SMTP id ffacd0b85a97d-36b5d0bc565mr6633811f8f.42.1722378008731; Tue, 30 Jul 2024 15:20:08 -0700 (PDT) Received: from localhost.localdomain ([78.196.4.158]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-428057b645dsm228583675e9.43.2024.07.30.15.20.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 30 Jul 2024 15:20:08 -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 2/6] docs/sphinx/depfile.py: Handle env.doc2path() returning a Path not a str Date: Wed, 31 Jul 2024 00:19:53 +0200 Message-ID: <20240730221957.34533-3-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240730221957.34533-1-philmd@linaro.org> References: <20240730221957.34533-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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():