From nobody Sun Nov 24 15:45:57 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=1722378050; cv=none; d=zohomail.com; s=zohoarc; b=QFEktrXUB01Nel+84ZZFuxre3qTlJ72LiwbSImYFDVuknOl18Fz4aA5GpJrddBUBfpxYWT7cdE7QO3CoK+gUhog8uvdMM08UJh4FXb7k047UyuMPg7Ned1OmhW3L20akwM2nvJsjXGfC6R4JrOGUn0hs89BDfjkc+qL0wJ3JhyE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722378050; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=X07qTbL83zQOZhtssmu4m+yBs6p/aBS1K1qhIZAMOfc=; b=U6+oYW6aFQrzI0GzkdWFgnwqhbmHlXNW3J/mUX/GmT/Lo/zbSe6gi0HYF/BuR/necRRNM8WuXZfFvODAYJcl4ikYx8LumtaPURLdX0QDlwO6I5sPrFGoo/JqDIpoGL3pqINaOS05aOZsXC+5UGypgOMWvvaRRaReVJamrbH5OfU= 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 1722378050495898.9921689838663; Tue, 30 Jul 2024 15:20:50 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: AGHT+IFLdynvy53y5gMjvknbOtbV++Jc0xdy9l4GQ5Zxkfoq8f/scL2zHt9mVA/yBsBu3t7c/QMoBw== 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) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-stable@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-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 Content-Type: text/plain; charset="utf-8" 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::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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722378052422116600 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-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 Message-ID: <20240729120533.2486427-1-peter.maydell@linaro.org> Signed-off-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 afdcbcec6e..e74be6af98 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.45.2