From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id mJJKDQqwOmTEhgAASxT56A (envelope-from ) for ; Sat, 15 Apr 2023 16:09:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id wN5YDQqwOmQogAAA9RJhRA (envelope-from ) for ; Sat, 15 Apr 2023 16:09:14 +0200 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 094CE463B for ; Sat, 15 Apr 2023 16:09:14 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pnga3-000368-HY; Sat, 15 Apr 2023 10:08:43 -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 1pnga2-00035v-JJ for guix-devel@gnu.org; Sat, 15 Apr 2023 10:08:42 -0400 Received: from jpoiret.xyz ([206.189.101.64]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pngZl-0006fM-Vu for guix-devel@gnu.org; Sat, 15 Apr 2023 10:08:42 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 19199185318; Sat, 15 Apr 2023 14:08:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1681567702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PLP208kpALnIwEyVRgxfZ+BjfB9MWc/XXX1IAdB1EEo=; b=o0CYqQ6NKr43ou2LY7wLuBwgrFKnX0f86ckLYkV2RJBB6kggbvhxz2jtGBTOaJrr1iomUA e++IW7gOjEc339x1WFmImltr+KOTxeN6Hd+etR8JHq3lDSzQt2k5nobw5S9aVTUj+JW/Kb AkiXnbtQ1h7Q9hxfzKPg7+pK+aSPDWl2AxqDong/TYpClf9WDmub7+jd4qD11EABYsGkib T+Ct3jvdsN1izlXuruVDASVnPAbp6hUO2BIDdorDKvwtNrL2LNbUvHlQTD61EdRpiC+erS ChlCwndUY7WgMAlWZevVuPIlY5dHxbAbfHs5f0us/MMDHWmX+Cu1dPD3aDNn7w== From: Josselin Poiret To: Andreas Enge , Kaelyn Cc: guix-devel , Josselin Poiret Subject: [PATCH core-updates] gnu: python-pytest: Fix failing test_raising_repr. Date: Sat, 15 Apr 2023 16:08:18 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Bar: ++++ Received-SPF: pass client-ip=206.189.101.64; envelope-from=dev@jpoiret.xyz; helo=jpoiret.xyz 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1681567754; a=rsa-sha256; cv=none; b=cLeynhyUy0otjyi01g9jGm1gHTLjP7Cr2yfn5RPDfv1X7NTpj8TxCYQAtB17Js2CQFX5+s e7PkMN3+6iJvLTjDeL2wpImxpH1UHLv5+P4TQYJE3ikc72e/XTamgoEAsQ+1qS5u7Mphfo U9hdHCUQGz2VG69WAbua5uhQpGwWMV4dU4JbY/OoMqLY9KWU6afrqZYmCw2bzCOb3duyYF +/GAbYAFTa3rlS4TUlKE0rQFD+F0v3KgUoeslqjeRkyEpopzDMC6DEGrE5DtqPrbgnybW0 /vywkBbQdmf9jT5LQ3/fBJ6A3rm/kRHbMrJJbc1Rte4J99p4QflyQg54uUhgww== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=jpoiret.xyz header.s=dkim header.b=o0CYqQ6N; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=reject) header.from=jpoiret.xyz ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1681567754; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=PLP208kpALnIwEyVRgxfZ+BjfB9MWc/XXX1IAdB1EEo=; b=tOJSNB8xOkUOfY9tqBWEWIkBOtOO3uTpAcC/CS5goL8uuRttgu5v5Y6gyHSMd1kJNdlY1v MGAlhJaXei08CxC9fUWVSHmyBHZ+st2UNr++4yZIPvJds/uw1kt4O+wuQXdwwD4S4nlF8q qruvOhEBJkc9RWTJqWju6ca9QjvU8/Jce5VzatFbm9WDOMVjeAiC+ujHhEGKgRzmhsOabX nnxC2QV6jWCu26MWwX3vmG7/NyW26Z4l8GzkkDqnbChXpT0I+dNG7xnD6bdm+I2UyMLR2L Vlrr6IWt2MRqnEcSb5SU69BFMsq/UXVevKubDqC9aMi/mIo5D5/yZvHH6zgjtw== X-Migadu-Queue-Id: 094CE463B Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=jpoiret.xyz header.s=dkim header.b=o0CYqQ6N; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=reject) header.from=jpoiret.xyz X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -5.95 X-Spam-Score: -5.95 X-TUID: gJqJfsmLMwwh * gnu/packages/patches/pytest-fix-unstrable-exception-test.patch: Add new patch from upstream. * gnu/packages/check.scm (python-pytest): Use it. * gnu/local.mk (dist_patch_DATA): Register it. --- Hey Andreas and Kaelyn, This should also fix it without bumping python-pytest to a new version (since it has so many dependents, don't want to introduce new breakage now). Best, Josselin gnu/local.mk | 1 + gnu/packages/check.scm | 3 +- .../pytest-fix-unstrable-exception-test.patch | 34 +++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/pytest-fix-unstrable-exception-test.patch diff --git a/gnu/local.mk b/gnu/local.mk index e29e09b688..73756a8c49 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1730,6 +1730,7 @@ dist_patch_DATA = \ %D%/packages/patches/pybugz-stty.patch \ %D%/packages/patches/pygpgme-disable-problematic-tests.patch \ %D%/packages/patches/pyqt-configure.patch \ + %D%/packages/patches/pytest-fix-unstrable-exception-test.patch \ %D%/packages/patches/python-2-deterministic-build-info.patch \ %D%/packages/patches/python-2.7-adjust-tests.patch \ %D%/packages/patches/python-2.7-expat-compat.patch \ diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index f388eb82a7..d072edbf51 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -1253,7 +1253,8 @@ (define-public python-pytest (uri (pypi-uri "pytest" version)) (sha256 (base32 - "0f8c31v5r2kgjixvy267n0nhc4xsy65g3n9lz1i1377z5pn5ydjg")))) + "0f8c31v5r2kgjixvy267n0nhc4xsy65g3n9lz1i1377z5pn5ydjg")) + (patches (search-patches "pytest-fix-unstrable-exception-test.patch")))) (build-system python-build-system) (arguments (list diff --git a/gnu/packages/patches/pytest-fix-unstrable-exception-test.patch b/gnu/packages/patches/pytest-fix-unstrable-exception-test.patch new file mode 100644 index 0000000000..4d77786b77 --- /dev/null +++ b/gnu/packages/patches/pytest-fix-unstrable-exception-test.patch @@ -0,0 +1,34 @@ +From b55e264a675f7621b8351e227b93742f19e01c7d Mon Sep 17 00:00:00 2001 +From: Daniel Valenzuela +Date: Wed, 9 Nov 2022 19:43:10 -0300 +Subject: [PATCH] Fix test_raising_repr test + +Closes #10473 + +Python <3.11 versions depend on `exceptiongroup>=1.0.0rc8`, and they released version `1.0.1` +6 days ago (2022/11/03) that as a side-effect changed the output of exceptions. +--- + testing/test_assertion.py | 10 +--------- + 1 file changed, 1 insertion(+), 9 deletions(-) + +diff --git a/testing/test_assertion.py b/testing/test_assertion.py +index d8844f2e41..7574592210 100644 +--- a/testing/test_assertion.py ++++ b/testing/test_assertion.py +@@ -1664,15 +1664,7 @@ def test_raising_repr(): + """ + ) + result = pytester.runpytest() +- if sys.version_info >= (3, 11): +- # python 3.11 has native support for un-str-able exceptions +- result.stdout.fnmatch_lines( +- ["E AssertionError: "] +- ) +- else: +- result.stdout.fnmatch_lines( +- ["E AssertionError: "] +- ) ++ result.stdout.fnmatch_lines(["E AssertionError: "]) + + + def test_issue_1944(pytester: Pytester) -> None: base-commit: 7ccf9943029747d4ba97160214f895b365511278 -- 2.39.2