From debbugs-submit-bounces@debbugs.gnu.org Tue May 19 03:47:01 2020 Received: (at submit) by debbugs.gnu.org; 19 May 2020 07:47:01 +0000 Received: from localhost ([127.0.0.1]:49088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jawxo-0004SG-Pd for submit@debbugs.gnu.org; Tue, 19 May 2020 03:47:01 -0400 Received: from lists.gnu.org ([209.51.188.17]:54608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jawxl-0004S7-T0 for submit@debbugs.gnu.org; Tue, 19 May 2020 03:47:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jawxl-0004f2-It for guix-patches@gnu.org; Tue, 19 May 2020 03:46:57 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:37437) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jawxh-0006qO-B4 for guix-patches@gnu.org; Tue, 19 May 2020 03:46:57 -0400 Received: by mail-wm1-x341.google.com with SMTP id z72so2280283wmc.2 for ; Tue, 19 May 2020 00:46:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leibniz-psychology-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=zgh8vkVjhJKJhC2O1q+/6ckfpGh3hLgOcofES5FKf08=; b=Z3x8IbWwgfH/Cvq/cb1P4pzSSDCuOV6wMQtfr03/LYRZ6woUqkmxq7m4PAsDKeVRK/ GiJ2Gonl3zt5+XP72ITRjixLmypHkqzby72okJ9fmZq4fXPZtfoax/Iwzy8XNI1QHSl1 iJ9ziS+X322VDjTU8KwpBfijJIHfd8/gb75Y+qxBsgs3UjD/VKYACeTqNkDoNtJG/CHP wALdkjUJjkT3xnNhyXVD8+HS24qInyrBcqlbDKS+G08obNflbFgSrzJxB7FuA2+kAWOp VQY2FqlPgDJYlTIc/yKbL0qvsxrKN9JI+dN9Fpr8ioXCqNLTKokkVZKNEWioaEX8Gn5R kwLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=zgh8vkVjhJKJhC2O1q+/6ckfpGh3hLgOcofES5FKf08=; b=K9O3cO6DVqohHuH97Bnk/N1LRTqU7pobNMFCAb0QSgHcZBBAk6wnaoSS4Vdg3bxV3h wm3RLBlorhg0L6CQPaVBTXm+rePvW65f633ClcBCNQlilntyiLzwQzBKo9RNnudi4nJq ncd1buCYIIerAE9N1+yEdsg5CoDT3mtG+V6GjBEJzGpo2mggOR31mfZgvR4H5khmvZwd bZTNihsUl2sAUtimmFtWQnEsq1kkvAwHJeKgRqhrmE3KH1g2tOZmJJbq5JrGSym5CZ48 h1qMHVgqUXCa05UpGhOJB4bl8qz82uDUFNoSsbnRwajdK9wtsZfzEOOltFuKK5b2GvBC /7PA== X-Gm-Message-State: AOAM530oRDnEd2aWibvrxtEATVmfmk7ZUAsak32/UCN58hs6H3x//cTd P1q5IgvUNOAEgmyawiuPQSQdCQ2DBhV9UXg4WF9zI5uGGACF8e2XNaO09NxpR9LJb9xfBOSF4MV k451n63G9xlTU52yLBxBdkWN6AtDWI4vOj3fJ6OPdappr2a2QR8MRkIlgusDsUoO26ysLuxfGZE rZCbwy0HE= X-Google-Smtp-Source: ABdhPJzUgHQnA5o0sMpJzGrbIHmTgDX+JbzEu1DVn91apwqVqYxSJq1gnesz510TAd5sFqZPv4J0SA== X-Received: by 2002:a1c:2087:: with SMTP id g129mr3740959wmg.126.1589874410940; Tue, 19 May 2020 00:46:50 -0700 (PDT) Received: from localhost (dynamic-2a01-0c23-7850-5200-7d0a-d634-6a10-7df9.c23.pool.telefonica.de. [2a01:c23:7850:5200:7d0a:d634:6a10:7df9]) by smtp.gmail.com with ESMTPSA id f8sm18877700wrm.8.2020.05.19.00.46.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 00:46:50 -0700 (PDT) Date: Tue, 19 May 2020 09:46:49 +0200 From: Lars-Dominik Braun To: guix-patches@gnu.org Subject: [PATCH] gnu: python-shouldbe: Python 3.8 compatibility Message-ID: <20200519074649.GA11910@zpidnp36> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ZGiS0Q5IWpPtfppv" Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Received-SPF: none client-ip=2a00:1450:4864:20::341; envelope-from=ldb@leibniz-psychology.org; helo=mail-wm1-x341.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --ZGiS0Q5IWpPtfppv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Upstream issue: https://github.com/DirectXMan12/should_be/pull/5 * gnu/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch: Add compatibilit= y patch * gnu/local.mk (dist_patch_DATA): Add new file * gnu/packages/python-xyz.scm (python-shouldbe)[source]: Add patch --- gnu/local.mk | 1 + .../python-shouldbe-0.1.2-cpy3.8.patch | 78 +++++++++++++++++++ gnu/packages/python-xyz.scm | 3 +- 3 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch diff --git a/gnu/local.mk b/gnu/local.mk index 38b286203e..7ab5882f1b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1432,6 +1432,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch= \ %D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \ %D%/packages/patches/python-robotframework-honor-source-date-epoch.patch= \ + %D%/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch \ %D%/packages/patches/python-slugify-depend-on-unidecode.patch \ %D%/packages/patches/python2-subprocess32-disable-input-test.patch \ %D%/packages/patches/python-unittest2-python3-compat.patch \ diff --git a/gnu/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch b/gnu/= packages/patches/python-shouldbe-0.1.2-cpy3.8.patch new file mode 100644 index 0000000000..0a80d15cd2 --- /dev/null +++ b/gnu/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch @@ -0,0 +1,78 @@ +diff -x '*.pyc' -Naur shouldbe-0.1.2/should_be/core.py shouldbe-0.1.2.patc= hed/should_be/core.py +--- shouldbe-0.1.2/should_be/core.py 2019-03-06 07:38:22.000000000 +0100 ++++ shouldbe-0.1.2.patched/should_be/core.py 2020-05-18 08:44:24.214664704= +0200 +@@ -103,7 +103,7 @@ + return resf +=20 +=20 +-def buildCode(baseCode, argcount=3DNone, kwonlyargcount=3DNone, ++def buildCode(baseCode, argcount=3DNone, posonlyargcount=3DNone, kwonlyar= gcount=3DNone, + nlocals=3DNone, stacksize=3DNone, flags=3DNone, + code=3DNone, consts=3DNone, names=3DNone, + varnames=3DNone, filename=3DNone, name=3DNone, +@@ -121,6 +121,24 @@ + nlocals or baseCode.co_nlocals, + stacksize or baseCode.co_stacksize, + flags or baseCode.co_flags, ++ code or baseCode.co_code, ++ consts or baseCode.co_consts, ++ names or baseCode.co_names, ++ varnames or baseCode.co_varnames, ++ filename or baseCode.co_filename, ++ name or baseCode.co_name, ++ firstlineno or baseCode.co_firstlineno, ++ lnotab or baseCode.co_lnotab, ++ freevars or baseCode.co_freevars, ++ cellvars or baseCode.co_cellvars) ++ elif hasattr(baseCode, 'co_posonlyargcount'): ++ # Python 3.8 ++ resc =3D CodeType(argcount or baseCode.co_argcount, ++ posonlyargcount or baseCode.co_posonlyargcount, ++ kwonlyargcount or baseCode.co_kwonlyargcount, ++ nlocals or baseCode.co_nlocals, ++ stacksize or baseCode.co_stacksize, ++ flags or baseCode.co_flags, + code or baseCode.co_code, + consts or baseCode.co_consts, + names or baseCode.co_names, +diff -x '*.pyc' -Naur shouldbe-0.1.2/should_be/tests/test_container_mixin.= py shouldbe-0.1.2.patched/should_be/tests/test_container_mixin.py +--- shouldbe-0.1.2/should_be/tests/test_container_mixin.py 2019-03-01 06:3= 8:16.000000000 +0100 ++++ shouldbe-0.1.2.patched/should_be/tests/test_container_mixin.py 2020-05= -18 09:00:51.372531064 +0200 +@@ -7,31 +7,31 @@ + self.lst =3D [1, 2, 3] +=20 + def test_should_include_iter(self): +- err_msg =3D (r'[a-zA-Z0-9.]+ should have included \[.+?\]' ++ err_msg =3D (r'[a-zA-Z0-9.()]+ should have included \[.+?\]' + r', but did not have items .+') +- self.assertRaisesRegexp(AssertionError, err_msg, ++ self.assertRaisesRegex(AssertionError, err_msg, + self.lst.should_include, [4]) +=20 + self.lst.should_include([1, 2, 3]) +=20 + def test_should_include_item(self): +- err_msg =3D (r'[a-zA-Z0-9.]+ should have included .+?' ++ err_msg =3D (r'[a-zA-Z0-9.()]+ should have included .+?' + r', but did not') +- self.assertRaisesRegexp(AssertionError, err_msg, ++ self.assertRaisesRegex(AssertionError, err_msg, + self.lst.should_include, 4) +=20 + self.lst.should_include(3) +=20 + def test_shouldnt_include_iter(self): + err_msg =3D 'should not have included' +- self.assertRaisesRegexp(AssertionError, err_msg, ++ self.assertRaisesRegex(AssertionError, err_msg, + self.lst.shouldnt_include, [2, 3]) +=20 + self.lst.shouldnt_include([4, 5]) +=20 + def test_shouldnt_include_item(self): + err_msg =3D 'should not have included' +- self.assertRaisesRegexp(AssertionError, err_msg, ++ self.assertRaisesRegex(AssertionError, err_msg, + self.lst.shouldnt_include, 3) +=20 + self.lst.shouldnt_include(4) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index c26a766d64..00a4fd51c4 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -18749,7 +18749,8 @@ and cuts down boilerplate code when testing librari= es for asyncio.") (uri (pypi-uri "shouldbe" version)) (sha256 (base32 - "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj")))) + "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj")) + (patches (search-patches "python-shouldbe-0.1.2-cpy3.8.patch")))) (build-system python-build-system) (propagated-inputs `(("python-forbiddenfruit" ,python-forbiddenfruit))) --=20 2.20.1 --ZGiS0Q5IWpPtfppv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEyk+M9DfXR4/aBV/UQhN3ARo3hEYFAl7DjuYACgkQQhN3ARo3 hEYLWgv+K0VSFV/vwFsvLSZ/33Dn9QEb0iXVKVunIFRgpFKCBLKoLZGGhfeHpsK2 Jcj6nf4zDoSBppzdqGhxOCNc97uBem6YZCeyTdtlzpqJ3mxJX/x0so4O91fX9dN8 OBhh9Gn8R7do+7yvitUkQs0vtOydEPVfonXN9IJ4oK2EWI7gooWT4Jnluh/Orf+H IslJ5tjWBJfwazZGN45P39Ox3GfvcNt91J/+Ux16Ead/7GgCeDqUWT5TDMN6nS85 rL/QNgMFy7G07gyYASwTyjTFS8Id2JhqdOu00xUpwdpcj3cvEGVMXpUEafTbaaZn yvxZCjQcH9w6wJWv4xytWA7jx/pXGT5Gh5hXQ3nGttoFS57wR+R7YGAVkOhOKZQY 72Zax8aVSnNcjLwiCmcz0wBqsreqGvXYeGNhR5bLbMFmLe1Gq3Xh8KF4jQ0PPp+j rP8EiiwgkkQRieXmsQ4O38f33kV8CrKbIwpOlF1grzAC7CM783vnsANBX2s077gv 3GTtX7m7 =xmTm -----END PGP SIGNATURE----- --ZGiS0Q5IWpPtfppv--