From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 1413E1FF15F for ; Mon, 16 Dec 2024 10:39:07 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1C10B835E; Mon, 16 Dec 2024 10:39:16 +0100 (CET) To: pve-devel@lists.proxmox.com Date: Mon, 16 Dec 2024 18:37:45 +0900 MIME-Version: 1.0 Message-ID: List-Id: Proxmox VE development discussion List-Post: From: Jing Luo via pve-devel Precedence: list Cc: Jing Luo X-Mailman-Version: 2.1.29 X-BeenThere: pve-devel@lists.proxmox.com List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: Proxmox VE development discussion List-Help: Subject: [pve-devel] [PATCH proxmox-backup] python3.12 compat: docs/_ext/proxmox-scanrefs.py: cast to string for re.sub() Content-Type: multipart/mixed; boundary="===============2153060183179684082==" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" --===============2153060183179684082== Content-Type: message/rfc822 Content-Disposition: inline Return-Path: X-Original-To: pve-devel@lists.proxmox.com Delivered-To: pve-devel@lists.proxmox.com Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id B979DC326F for ; Mon, 16 Dec 2024 10:39:13 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 8DAF18336 for ; Mon, 16 Dec 2024 10:38:43 +0100 (CET) Received: from mail-gw3.jing.rocks (mail-gw3.jing.rocks [219.117.250.209]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Mon, 16 Dec 2024 10:38:39 +0100 (CET) Received: from mail-gw3.jing.rocks (localhost [127.0.0.1]) by mail-gw3.jing.rocks (Proxmox) with ESMTP id 4D7D71747C for ; Mon, 16 Dec 2024 18:38:29 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jing.rocks; h=cc :cc:content-transfer-encoding:date:from:from:message-id :mime-version:reply-to:subject:subject:to:to; s=mail-gw; bh=JLrX UUB7gHtsZRqa3evkDlKQ4ibky/kfk9akDGoPcno=; b=XVciHTjScHc+C2CUOJIp vGG13pBHgHMnsrZc2w1OQZlR5HoJB9Xn6ljO7ygUtExsp5GFcdIzaMQwowcZaKLt /r96XmrqFlIwuL9M9m0YnpkTQc6FJkTLb2NJpvtHbPNbJOM3t9DnPTwvD+HErjwG 4QPgSBvgSVZFYIQc5tSuc9n76gYm8nZNbZihFb0vP7D/97JvI08jIcKfVUacvasu VfABa9OK0aLTIsyIou4vSNQwq0vaqXoS21JuK4IJZdPLSn98JYsMWy/HsiglUEvl B35UjGqY+mpFmUx4JKy+zwfnfVC/uiDflVmPuXJ6b8IEXku8QFmgZd9eGYHI0eK7 og== Received: from mail.jing.rocks (mail.jing.rocks [192.168.0.222]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail-gw3.jing.rocks (Proxmox) with ESMTPS id 9B14517477 for ; Mon, 16 Dec 2024 18:38:27 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=jing.rocks; s=default; t=1734341907; bh=0wr6SVhrRPpdbksD46mAmu1nP8rDf6ijQZyudAo8Qh4=; h=From:To:Cc:Subject:Date:From; b=FWDY5IQUI52robcZ7UkDsbGD6cxfJNEmAF2q1EdRmDAAlORWDPidBPjwushNIx8BF qsUgsR+VaRiji8zXJo6DJQ2ceNSM55mAYK1r/rR1qozPx9oggUamA0BW4i8f7qpZOh EJfMAqpQzcbJnTpFOIGJsjpklhU0jgh2hG2H+XvJJ2bWJG3khKpXaAZi/ut3dilxCj dgwtGPw3VP3RTv/RuCPsBb44hTHuCLHqP+Yznzspe/Ac5QB2PFzh1Lq9Mvo+XFcKlI D9bBDPQCDwr3X6DwlIuVDPP8CRCE2PXYVrh8SPSbc0aWcfFYOyIthxFKrrjBZWjZtZ nglmuiwY7LyiQ== Received: from X570AM.jing.rocks (unknown [IPv6:240b:10:f00:1b00::7e82]) (Authenticated sender: jing@jing.rocks) by mail.jing.rocks (Postfix) with ESMTPSA id 8EFCE4096F; Mon, 16 Dec 2024 18:38:27 +0900 (JST) From: Jing Luo To: pve-devel@lists.proxmox.com Cc: Jing Luo Subject: [PATCH proxmox-backup] python3.12 compat: docs/_ext/proxmox-scanrefs.py: cast to string for re.sub() Date: Mon, 16 Dec 2024 18:37:45 +0900 Message-ID: <20241216093744.3324807-2-jing@jing.rocks> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.001 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_PASS -0.1 DMARC pass policy KAM_INFOUSMEBIZ 0.75 Prevalent use of .info|.us|.me|.me.uk|.biz|xyz|id|rocks|life domains in spam/malware KAM_OTHER_BAD_TLD 0.75 Other untrustworthy TLDs RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record This fixes a FTBFS with python 3.12. We need to cast "filename" to string. Sphinx version: 8.1.3 Python version: 3.12.8 (CPython) Docutils version: 0.21.2 Jinja2 version: 3.1.3 Pygments version: 2.18.0 Last messages: copying assets... copying assets: done writing output... [ 1%] GFDL writing output... [ 2%] backup-client Loaded extensions: sphinx.ext.mathjax (8.1.3) alabaster (0.7.16) sphinx.ext.graphviz (8.1.3) sphinx.ext.todo (8.1.3) proxmox-scanrefs (0.1) Traceback (most recent call last): File "/usr/lib/python3/dist-packages/sphinx/cmd/build.py", line 514, in build_main app.build(args.force_all, args.filenames) File "/usr/lib/python3/dist-packages/sphinx/application.py", line 380, in build self.builder.build_update() File "/usr/lib/python3/dist-packages/sphinx/builders/__init__.py", line 355, in build_update self.build(['__all__'], to_build) File "/usr/lib/python3/dist-packages/sphinx/builders/__init__.py", line 437, in build self.write(docnames, list(updated_docnames), method) File "/usr/lib/python3/dist-packages/sphinx/builders/__init__.py", line 711, in write self.write_documents(docnames) File "/usr/lib/python3/dist-packages/sphinx/builders/__init__.py", line 725, in write_documents self._write_serial(sorted_docnames) File "/usr/lib/python3/dist-packages/sphinx/builders/__init__.py", line 744, in _write_serial self.write_doc(docname, doctree) File "/home/jing/proxmox-backup/build/docs/_ext/proxmox-scanrefs.py", line 92, in write_doc filename_html = re.sub('.rst', '.html', filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/re/__init__.py", line 186, in sub return _compile(pattern, flags).sub(repl, string, count) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: expected string or bytes-like object, got '_StrPath' Signed-off-by: Jing Luo --- docs/_ext/proxmox-scanrefs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_ext/proxmox-scanrefs.py b/docs/_ext/proxmox-scanrefs.py index 0d626561..680035e0 100644 --- a/docs/_ext/proxmox-scanrefs.py +++ b/docs/_ext/proxmox-scanrefs.py @@ -89,7 +89,7 @@ class ReflabelMapper(Builder): if hasattr(node, 'expect_referenced_by_id') and len(node['ids']) > 1: # explicit labels filename = self.env.doc2path(docname) - filename_html = re.sub('.rst', '.html', filename) + filename_html = re.sub('.rst', '.html', str(filename)) # node['ids'][0] contains a normalized version of the # headline. If the ref and headline are the same -- 2.47.1 --===============2153060183179684082== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel --===============2153060183179684082==--