From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 8N+bDMYWl2VACAAAkFu2QA (envelope-from ) for ; Thu, 04 Jan 2024 21:36:22 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id wKRQCcYWl2Xl0AAA62LTzQ (envelope-from ) for ; Thu, 04 Jan 2024 21:36:22 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1704400582; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=D+JLbjPA4Z4UnESXMifdOvgyHqRr64+ekcDgpmv7NCI=; b=XUNgAVD7MFFj+RC5u94f1NHaYf5srFlkHpEPUZIjVdiWoxOexxrVm5Et53r4pjxQ0E8vPL sA5jbh7PthZ40b8fxpPrQnVz3Hqfyw4Zl33TdoQdPoTE0kKL4RY1/1Up/w6tmZ0Zoehi9N Tu/XI8jnCcud2ux6RnIwSDdpLpQCDwjMDFrJUVRxsxdfJ5/W0++/X/K2UKxw8Q/zks6VgA d85jxSUHLvAbBPkk9T7+uFy3lQjNryfdOqoBvP1iALqDSXFdoHbE1dd/RZxmdCTwL4oJZF FEL7UzjwoqOOSHoKIqDLfL2AWAy38Cj6YefcPHGc57JfjvEGpamHXrD3DJXDXQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704400582; a=rsa-sha256; cv=none; b=JBuwm36HMMwYC7w7ekqEfoozRR9F1lAgCGshpq2r7Msm9mNahYqNxVM9Bv5o6IoPGT0Kwl RL51/DqqGQYUKX7JbjBkm97UmF7dT9AK8VoeNtVg7SvjSIiuyQlAGK9Vc4Aufe8mhmvQDf brWyQi04D1kk/TCfU1VT9mUotXcf0su67K4bULrY8wbGFfuGjysFvbgSpcnM50b2r+N1Ih oAApCdJl8HtjaBpOeU0nbujFJMhcD7TxW6Uv+qcGS+Hi7kBd5pPm2/GDQz29g598RsQHxO zRyyUc11zb/DdVNzF21KNXVrJ7F6/KwilWlZeeRMu8OimKDjpt8q8WGkDN0pBQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 86F48644D6 for ; Thu, 4 Jan 2024 21:36:21 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLURc-0006gk-3L; Thu, 04 Jan 2024 15:36:00 -0500 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 1rLURa-0006VD-CG for bug-guix@gnu.org; Thu, 04 Jan 2024 15:35:58 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rLURa-00067C-2D for bug-guix@gnu.org; Thu, 04 Jan 2024 15:35:58 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rLURd-0008BH-LU for bug-guix@gnu.org; Thu, 04 Jan 2024 15:36:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#66173: [PATCH 2/2] gnu: unknown-horizons: Fix build and runtime errors. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 04 Jan 2024 20:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66173 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 66173@debbugs.gnu.org Received: via spool by 66173-submit@debbugs.gnu.org id=B66173.170440051831364 (code B ref 66173); Thu, 04 Jan 2024 20:36:01 +0000 Received: (at 66173) by debbugs.gnu.org; 4 Jan 2024 20:35:18 +0000 Received: from localhost ([127.0.0.1]:55796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rLUQv-00089m-Pp for submit@debbugs.gnu.org; Thu, 04 Jan 2024 15:35:18 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:36974) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rLUQr-00089K-Iu for 66173@debbugs.gnu.org; Thu, 04 Jan 2024 15:35:16 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 6D282659FA for <66173@debbugs.gnu.org>; Thu, 4 Jan 2024 20:34:34 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo07-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo07-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XHX06nk3csqy for <66173@debbugs.gnu.org>; Thu, 4 Jan 2024 20:34:34 +0000 (UTC) Received: from jupiter.smallsystems.net (23-233-96-210.cpe.pppoe.ca [23.233.96.210]) (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 mailout.easymail.ca (Postfix) with ESMTPSA id D627B65A17 for <66173@debbugs.gnu.org>; Thu, 4 Jan 2024 20:34:33 +0000 (UTC) From: Simon South Date: Thu, 4 Jan 2024 15:33:56 -0500 Message-ID: <90340dad1ea7d9f8e3cd4213684b503702cd20ad.1704399085.git.simon@simonsouth.net> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -4.97 X-Spam-Score: -4.97 X-Migadu-Queue-Id: 86F48644D6 X-TUID: Tb8YQOScHkjF Apply two upstream commits that allow building with Python 3.9 or newer and running with Python 3.10. * gnu/packages/patches/unknown-horizons-python-3.9.patch, * gnu/packages/patches/unknown-horizons-python-3.10.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/games.scm (unknown-horizons)[source]: Apply them. Change-Id: Icbc8b698b913be01465b09ab26afb29e5fd62a87 --- gnu/local.mk | 2 + gnu/packages/games.scm | 4 +- .../unknown-horizons-python-3.10.patch | 32 +++++++++++++++ .../patches/unknown-horizons-python-3.9.patch | 41 +++++++++++++++++++ 4 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/unknown-horizons-python-3.10.patch create mode 100644 gnu/packages/patches/unknown-horizons-python-3.9.patch diff --git a/gnu/local.mk b/gnu/local.mk index f66db809a9..bbde67cee2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2082,6 +2082,8 @@ dist_patch_DATA = \ %D%/packages/patches/ungoogled-chromium-system-ffmpeg.patch \ %D%/packages/patches/ungoogled-chromium-system-nspr.patch \ %D%/packages/patches/unknown-horizons-python-3.8-distro.patch \ + %D%/packages/patches/unknown-horizons-python-3.9.patch \ + %D%/packages/patches/unknown-horizons-python-3.10.patch \ %D%/packages/patches/unzip-CVE-2014-8139.patch \ %D%/packages/patches/unzip-CVE-2014-8140.patch \ %D%/packages/patches/unzip-CVE-2014-8141.patch \ diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 333dbfcec5..880aebe0bb 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -4396,7 +4396,9 @@ (define-public unknown-horizons (sha256 (base32 "1n747p7h0qp48szgp262swg0xh8kxy1bw8ag1qczs4i26hyzs5x4")) - (patches (search-patches "unknown-horizons-python-3.8-distro.patch")))) + (patches (search-patches "unknown-horizons-python-3.8-distro.patch" + "unknown-horizons-python-3.9.patch" + "unknown-horizons-python-3.10.patch")))) (build-system python-build-system) (arguments '(#:phases diff --git a/gnu/packages/patches/unknown-horizons-python-3.10.patch b/gnu/packages/patches/unknown-horizons-python-3.10.patch new file mode 100644 index 0000000000..599de1fec5 --- /dev/null +++ b/gnu/packages/patches/unknown-horizons-python-3.10.patch @@ -0,0 +1,32 @@ +From 4ff605d6c55fcf3e9b4777ffbcb0c24ef17ba4ca Mon Sep 17 00:00:00 2001 +From: Arti +Date: Mon, 28 Feb 2022 21:19:50 +0100 +Subject: [PATCH] Rename instances of `collections.Iterable` into + `collections.abc.Iterable` (#2956) + +--- + horizons/ai/aiplayer/combat/unitmanager.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/horizons/ai/aiplayer/combat/unitmanager.py b/horizons/ai/aiplayer/combat/unitmanager.py +index 8449d5563c5..57db0d47061 100644 +--- a/horizons/ai/aiplayer/combat/unitmanager.py ++++ b/horizons/ai/aiplayer/combat/unitmanager.py +@@ -151,7 +151,7 @@ def _ship_state_rule(self, state_dict, ship_states): + """ + Rule stating that ship has to be in any of given states. + """ +- if not isinstance(ship_states, collections.Iterable): ++ if not isinstance(ship_states, collections.abc.Iterable): + ship_states = (ship_states,) + return lambda ship: (state_dict[ship] in ship_states) + +@@ -178,7 +178,7 @@ def filter_ships(self, ships, rules): + @param rules: conditions each ship has to meet (AND) + @type rules: iterable of lambda(ship) or single lambda(ship) + """ +- if not isinstance(rules, collections.Iterable): ++ if not isinstance(rules, collections.abc.Iterable): + rules = (rules,) + return [ship for ship in ships if all((rule(ship) for rule in rules))] + diff --git a/gnu/packages/patches/unknown-horizons-python-3.9.patch b/gnu/packages/patches/unknown-horizons-python-3.9.patch new file mode 100644 index 0000000000..8b93a71b6c --- /dev/null +++ b/gnu/packages/patches/unknown-horizons-python-3.9.patch @@ -0,0 +1,41 @@ +From 7f6f613826aef9810999c1599c8354e8a78fbdb4 Mon Sep 17 00:00:00 2001 +From: Lukas1818 <44570204+Lukas1818@users.noreply.github.com> +Date: Fri, 19 Feb 2021 21:08:44 +0100 +Subject: [PATCH] fixs for Phyton 3.9 (#2955) + +* change deprecated isAlive() to is_alive() + +* remove unsupported keyword "encoding" + +Co-authored-by: Lukas1818 +--- + horizons/util/loaders/jsondecoder.py | 2 +- + horizons/util/preloader.py | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/horizons/util/loaders/jsondecoder.py b/horizons/util/loaders/jsondecoder.py +index ea2ddfb3308..138a948f42a 100644 +--- a/horizons/util/loaders/jsondecoder.py ++++ b/horizons/util/loaders/jsondecoder.py +@@ -37,4 +37,4 @@ def _decode_dict(dct): + return newdict + + with open(path, "r") as f: +- return json.load(f, encoding="ascii", object_hook=_decode_dict) ++ return json.load(f, object_hook=_decode_dict) +diff --git a/horizons/util/preloader.py b/horizons/util/preloader.py +index 5689cc68152..2e072fcc642 100644 +--- a/horizons/util/preloader.py ++++ b/horizons/util/preloader.py +@@ -79,9 +79,9 @@ def wait_for_finish(self): + """ + self.lock.acquire() + # wait until it finished its current action +- if self.isAlive(): ++ if self.is_alive(): + self.join() +- assert not self.isAlive() ++ assert not self.is_alive() + else: + try: + self.lock.release() -- 2.41.0