From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (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 finch.gentoo.org (Postfix) with ESMTPS id 0D7C8159C96 for ; Tue, 30 Jul 2024 08:50:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 537342BC085; Tue, 30 Jul 2024 08:50:06 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 299AA2BC085 for ; Tue, 30 Jul 2024 08:50:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 smtp.gentoo.org (Postfix) with ESMTPS id A82BD343023 for ; Tue, 30 Jul 2024 08:50:03 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E60981E87 for ; Tue, 30 Jul 2024 08:49:58 +0000 (UTC) From: "Pacho Ramos" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Pacho Ramos" Message-ID: <1722329282.486c55ba97a201f95a09739806289129a076eb88.pacho@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-vcs/gitstats/files/, dev-vcs/gitstats/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-vcs/gitstats/files/gitstats-0_pre20201124-py312.patch dev-vcs/gitstats/gitstats-0_pre20201124.ebuild X-VCS-Directories: dev-vcs/gitstats/ dev-vcs/gitstats/files/ X-VCS-Committer: pacho X-VCS-Committer-Name: Pacho Ramos X-VCS-Revision: 486c55ba97a201f95a09739806289129a076eb88 X-VCS-Branch: master Date: Tue, 30 Jul 2024 08:49:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: eff0f0f3-a696-463a-9a75-187ad43d935d X-Archives-Hash: 6cca91ef108f285a8eb3df7876647c87 commit: 486c55ba97a201f95a09739806289129a076eb88 Author: Pacho Ramos gentoo org> AuthorDate: Tue Jul 30 08:26:34 2024 +0000 Commit: Pacho Ramos gentoo org> CommitDate: Tue Jul 30 08:48:02 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=486c55ba dev-vcs/gitstats: Support python 3.12 Thanks-to: Khumba Closes: https://bugs.gentoo.org/929561 Signed-off-by: Pacho Ramos gentoo.org> .../files/gitstats-0_pre20201124-py312.patch | 44 ++++++++++++++++++++++ dev-vcs/gitstats/gitstats-0_pre20201124.ebuild | 9 +++-- 2 files changed, 50 insertions(+), 3 deletions(-) diff --git a/dev-vcs/gitstats/files/gitstats-0_pre20201124-py312.patch b/dev-vcs/gitstats/files/gitstats-0_pre20201124-py312.patch new file mode 100644 index 000000000000..3896fd87e937 --- /dev/null +++ b/dev-vcs/gitstats/files/gitstats-0_pre20201124-py312.patch @@ -0,0 +1,44 @@ +From 4743c3fe184ce6e10d145c536af5b3689b069fc2 Mon Sep 17 00:00:00 2001 +From: Bryan Gardiner +Date: Fri, 14 Jun 2024 19:13:32 -0700 +Subject: [PATCH] Use raw strings for regexs to fix new SyntaxWarnings in + Python 3.12. + +--- + gitstats | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/gitstats b/gitstats +index 9f14a0f..37005f3 100755 +--- a/gitstats ++++ b/gitstats +@@ -96,7 +96,7 @@ def getkeyssortedbyvaluekey(d, key): + return [el[1] for el in sorted([(d[el][key], el) for el in list(d.keys())])] + + def getstatsummarycounts(line): +- numbers = re.findall('\d+', line) ++ numbers = re.findall(r'\d+', line) + if len(numbers) == 1: + # neither insertions nor deletions: may probably only happen for "0 files changed" + numbers.append(0); +@@ -322,7 +322,7 @@ class GitDataCollector(DataCollector): + continue + prev = tag + for line in output.split('\n'): +- parts = re.split('\s+', line, 2) ++ parts = re.split(r'\s+', line, 2) + commits = int(parts[1]) + author = parts[2] + self.tags[tag]['commits'] += commits +@@ -485,7 +485,7 @@ class GitDataCollector(DataCollector): + for line in lines: + if len(line) == 0: + continue +- parts = re.split('\s+', line, 4) ++ parts = re.split(r'\s+', line, 4) + if parts[0] == '160000' and parts[3] == '-': + # skip submodules + continue +-- +2.44.2 + diff --git a/dev-vcs/gitstats/gitstats-0_pre20201124.ebuild b/dev-vcs/gitstats/gitstats-0_pre20201124.ebuild index 9dfd0467a905..ce08093e401a 100644 --- a/dev-vcs/gitstats/gitstats-0_pre20201124.ebuild +++ b/dev-vcs/gitstats/gitstats-0_pre20201124.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_COMPAT=( python3_{10..12} ) inherit python-r1 @@ -30,9 +30,12 @@ BDEPEND=" DOCS=( doc/{AUTHOR,README,TODO.txt} ) src_prepare() { + eapply "${FILESDIR}/${P}-py312.patch" + sed \ -e "s:basedirs = \[binarypath, secondarypath, '/usr/share/gitstats'\]:basedirs = \['${EPREFIX}/usr/share/gitstats'\]:g" \ -i gitstats || die "failed to fix static files path" + default }