From unknown Sat Jun 21 05:04:25 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38208] [PATCH] gnu: Add python-3.8. Resent-From: Tanguy Le Carrour Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 14 Nov 2019 08:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 38208 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 38208@debbugs.gnu.org Cc: Tanguy Le Carrour X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.157372113024712 (code B ref -1); Thu, 14 Nov 2019 08:46:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Nov 2019 08:45:30 +0000 Received: from localhost ([127.0.0.1]:60913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVAkn-0006QR-3q for submit@debbugs.gnu.org; Thu, 14 Nov 2019 03:45:30 -0500 Received: from lists.gnu.org ([209.51.188.17]:48110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVAkl-0006QK-Tq for submit@debbugs.gnu.org; Thu, 14 Nov 2019 03:45:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50866) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVAkk-0002RW-8L for guix-patches@gnu.org; Thu, 14 Nov 2019 03:45:23 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_40,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iVAki-0004Rn-Lh for guix-patches@gnu.org; Thu, 14 Nov 2019 03:45:22 -0500 Received: from relay12.mail.gandi.net ([217.70.178.232]:40459) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iVAki-0004Pt-Cc for guix-patches@gnu.org; Thu, 14 Nov 2019 03:45:20 -0500 Received: from rafflesia.easter-eggs.fr (176-159-32-89.abo.bbox.fr [176.159.32.89]) (Authenticated sender: tanguy@bioneland.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 0D44E200011; Thu, 14 Nov 2019 08:45:17 +0000 (UTC) From: Tanguy Le Carrour Date: Thu, 14 Nov 2019 09:44:53 +0100 Message-Id: <20191114084453.27042-1-tanguy@bioneland.org> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.70.178.232 X-Spam-Score: -2.3 (--) 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 (---) * gnu/packages/python.scm (python-3.8): New public variable. [source]: Add patches to skip four tests. * gnu/packages/patches/python-3.8-search-paths.patch: New file. * gnu/packages/patches/python-3.8-fix-tests.patch: New file. --- .../patches/python-3.8-fix-tests.patch | 42 +++++++++++++++++++ .../patches/python-3.8-search-paths.patch | 17 ++++++++ gnu/packages/python.scm | 25 +++++++++++ 3 files changed, 84 insertions(+) create mode 100644 gnu/packages/patches/python-3.8-fix-tests.patch create mode 100644 gnu/packages/patches/python-3.8-search-paths.patch diff --git a/gnu/packages/patches/python-3.8-fix-tests.patch b/gnu/packages/patches/python-3.8-fix-tests.patch new file mode 100644 index 0000000000..bea311992a --- /dev/null +++ b/gnu/packages/patches/python-3.8-fix-tests.patch @@ -0,0 +1,42 @@ +diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py +index 1474624..887f8ee 100644 +--- a/Lib/test/_test_multiprocessing.py ++++ b/Lib/test/_test_multiprocessing.py +@@ -3801,6 +3801,7 @@ class _TestSharedMemory(BaseTestCase): + sms.close() + + @unittest.skipIf(os.name != "posix", "not feasible in non-posix platforms") ++ @unittest.skipIf(True, "This fails for unknown reasons on Guix") + def test_shared_memory_SharedMemoryServer_ignores_sigint(self): + # bpo-36368: protect SharedMemoryManager server process from + # KeyboardInterrupt signals. +diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py +index d41e94b..a1c15e7 100644 +--- a/Lib/test/test_signal.py ++++ b/Lib/test/test_signal.py +@@ -78,6 +78,7 @@ class PosixTests(unittest.TestCase): + self.assertLess(len(s), signal.NSIG) + + @unittest.skipUnless(sys.executable, "sys.executable required.") ++ @unittest.skipIf(True, "This fails for unknown reasons on Guix") + def test_keyboard_interrupt_exit_code(self): + """KeyboardInterrupt triggers exit via SIGINT.""" + process = subprocess.run( +@@ -128,6 +129,7 @@ class WindowsSignalTests(unittest.TestCase): + signal.signal(7, handler) + + @unittest.skipUnless(sys.executable, "sys.executable required.") ++ @unittest.skipIf(True, "This fails for unknown reasons on Guix") + def test_keyboard_interrupt_exit_code(self): + """KeyboardInterrupt triggers an exit using STATUS_CONTROL_C_EXIT.""" + # We don't test via os.kill(os.getpid(), signal.CTRL_C_EVENT) here +@@ -1245,6 +1247,7 @@ class StressTest(unittest.TestCase): + + class RaiseSignalTest(unittest.TestCase): + ++ @unittest.skipIf(True, "This fails for unknown reasons on Guix") + def test_sigint(self): + with self.assertRaises(KeyboardInterrupt): + signal.raise_signal(signal.SIGINT) +-- +2.23.0 diff --git a/gnu/packages/patches/python-3.8-search-paths.patch b/gnu/packages/patches/python-3.8-search-paths.patch new file mode 100644 index 0000000000..22e102ccbe --- /dev/null +++ b/gnu/packages/patches/python-3.8-search-paths.patch @@ -0,0 +1,17 @@ +diff --git a/setup.py b/setup.py +index 20d7f35..5751083 100644 +--- a/setup.py ++++ b/setup.py +@@ -676,8 +676,8 @@ class PyBuildExt(build_ext): + # if a file is found in one of those directories, it can + # be assumed that no additional -I,-L directives are needed. + if not CROSS_COMPILING: +- self.lib_dirs = self.compiler.library_dirs + system_lib_dirs +- self.inc_dirs = self.compiler.include_dirs + system_include_dirs ++ self.lib_dirs = os.getenv('LIBRARY_PATH', '').split(os.pathsep) ++ self.inc_dirs = os.getenv('CPATH', '').split(os.pathsep) + else: + # Add the sysroot paths. 'sysroot' is a compiler option used to + # set the logical path of the standard system headers and +-- +2.23.0 diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 644c9d7666..8a2d3e9721 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -57,6 +57,7 @@ ;;; Copyright © 2018, 2019 Maxim Cournoyer ;;; Copyright © 2018 Luther Thompson ;;; Copyright © 2018 Vagrant Cascadian +;;; Copyright © 2019 Tanguy Le Carrour ;;; ;;; This file is part of GNU Guix. ;;; @@ -408,6 +409,30 @@ data types.") (version-major+minor version) "/site-packages")))))))) +(define-public python-3.8 + (package + (inherit python-3.7) + (version "3.8.0") + (source + (origin + (inherit (package-source python-3.7)) + (uri (string-append "https://www.python.org/ftp/python/" + version "/Python-" version ".tar.xz")) + (sha256 (base32 "110d0did9rxn7rg85kf2fwli5hqq44xv2d8bi7d92m7v2d728mmk")) + (patches (search-patches + "python-3.8-search-paths.patch" + "python-3-fix-tests.patch" + "python-3.8-fix-tests.patch" + "python-3-deterministic-build-info.patch")) + (snippet + '(begin + ;; Delete the bundled copy of libexpat. + (delete-file-recursively "Modules/expat") + (substitute* "Modules/Setup" + ;; Link Expat instead of embedding the bundled one. + (("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n")) + #t)))))) + ;; Current 3.x version. (define-public python-3 python-3.7) -- 2.24.0 From unknown Sat Jun 21 05:04:25 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38208] [PATCH] gnu: Add python-3.8. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 15 Nov 2019 17:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38208 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tanguy Le Carrour , 38208@debbugs.gnu.org Cc: Tanguy Le Carrour Received: via spool by 38208-submit@debbugs.gnu.org id=B38208.15738389469398 (code B ref 38208); Fri, 15 Nov 2019 17:30:02 +0000 Received: (at 38208) by debbugs.gnu.org; 15 Nov 2019 17:29:06 +0000 Received: from localhost ([127.0.0.1]:37322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVfP7-0002RW-VE for submit@debbugs.gnu.org; Fri, 15 Nov 2019 12:29:06 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:42743) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVfP6-0002Qn-6K for 38208@debbugs.gnu.org; Fri, 15 Nov 2019 12:29:05 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id AA19421B6A; Fri, 15 Nov 2019 12:28:58 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 15 Nov 2019 12:28:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm1; bh=NdREA0e6gPhMRhPf16Q+3siPSF GR1s2jBhWSc1CH6i4=; b=LauXhudHfbZhwMvTP54z0HOqXa3/IrQ1oIRtoIQ/lS HEW/JZAd+IqBdGJwb+4YrP0sC99MV0J4AsEan3sqxDHhFp3ePbjwpzpj0niaK5A0 EZ9WlukzHbOzIRx3gQkszVA/gks4kZ5lAlEbnDi6pCuAv5FQh+jmFO+Ph4lT3o1U yhx43j+/PxUHAy3Fvk20AGQJx+CzRIbIKnmVzR00Jmfe46faHqKPoUgi1CA4vp1z 0b3Jajbq+XbB+39tyzq1R8GmSjz+WzlWCJIIiYevD++8jKEEtuuLKRTzEhaCOtWA 0NdW5OAPp0nqs+Z/dKjIiDq1MdaLk6jraaugpnM5KNdQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=NdREA0 e6gPhMRhPf16Q+3siPSFGR1s2jBhWSc1CH6i4=; b=snneMcHD6sybCCYfqJjSm4 NnBmNqXgTd7hdzMIFWxaaw+tDJHkYTuQpg7H0AHr5mRPdqj/mAVJgtF45My+EV5A bOHWgSOtohsB4MgSWrQEGd3Db8aDVgOhtEqw/iM6pmDo1TznbROAepvsddNJnV+q 0MTmoiL46IM/18aa0tF1qbCxeWXU0ktWLOzai90I63Yowj40qUh0+g3vzQp2mHhp RP2d9L0BxjLtt3KQhzTV623g2XR+bC8bkIw6kvovKbK3HtZmE5R1pxILoyDEQsGz zwkb9Xdov+cL+k55Xt0reKWOVP8yWGnD+aZt11wBX1/Z7yLQmeGu7vVGswTa2yDA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudefhedguddtudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffujghffgffkfggtgesghdtreertderjeenucfhrhhomhepofgrrhhi uhhsuceurghkkhgvuceomhgsrghkkhgvsehfrghsthhmrghilhdrtghomheqnecuffhomh grihhnpehphihthhhonhdrohhrghenucfkphepiedvrdduiedrudelvddrudehtdenucfr rghrrghmpehmrghilhhfrhhomhepmhgsrghkkhgvsehfrghsthhmrghilhdrtghomhenuc evlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from localhost (ti0006q161-0149.bb.online.no [62.16.192.150]) by mail.messagingengine.com (Postfix) with ESMTPA id D980280059; Fri, 15 Nov 2019 12:28:57 -0500 (EST) From: Marius Bakke In-Reply-To: <20191114084453.27042-1-tanguy@bioneland.org> References: <20191114084453.27042-1-tanguy@bioneland.org> User-Agent: Notmuch/0.29.1 (https://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Fri, 15 Nov 2019 18:28:56 +0100 Message-ID: <874kz5giav.fsf@devup.no> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) 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: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Tanguy, Tanguy Le Carrour writes: > * gnu/packages/python.scm (python-3.8):=C2=A0New public variable. > [source]: Add patches to skip four tests. > * gnu/packages/patches/python-3.8-search-paths.patch: New file. > * gnu/packages/patches/python-3.8-fix-tests.patch: New file. Thank you for this! > ++ @unittest.skipIf(True, "This fails for unknown reasons on Guix") > + def test_keyboard_interrupt_exit_code(self): > + """KeyboardInterrupt triggers exit via SIGINT.""" > + process =3D subprocess.run( I'm fairly confident that these failures are because stdin is not a TTY. Can you try changing to this? @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY = device") It would be good to submit a patch along these lines upstream if that works. > +(define-public python-3.8 > + (package > + (inherit python-3.7) > + (version "3.8.0") > + (source > + (origin > + (inherit (package-source python-3.7)) > + (uri (string-append "https://www.python.org/ftp/python/" > + version "/Python-" version ".tar.xz")) > + (sha256 (base32 "110d0did9rxn7rg85kf2fwli5hqq44xv2d8bi7d92m7v2d72= 8mmk")) > + (patches (search-patches > + "python-3.8-search-paths.patch" > + "python-3-fix-tests.patch" > + "python-3.8-fix-tests.patch" > + "python-3-deterministic-build-info.patch")) > + (snippet > + '(begin > + ;; Delete the bundled copy of libexpat. > + (delete-file-recursively "Modules/expat") > + (substitute* "Modules/Setup" > + ;; Link Expat instead of embedding the bundled one. > + (("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n")) > + #t)))))) One final question... Do you know how stable the Python ABI is? Are packages compiled with 3.7 guaranteed to work with 3.8? I wonder if we should 1) rename it to 'python-next', and 2) override 'native-search-paths' so that it searches 'lib/python3.8/site-packages'. My concern is that e.g. 'guix environment --ad-hoc python python-numpy' might stop working unless we rename it, and/or adjust search paths. If Python 3.8 is fully backwards compatible, we probably don't have to do anything, otherwise we should adjust accordingly. Thoughts? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl3O4FgACgkQoqBt8qM6 VPrRdQf+IG+0KgVmDy3YE1wSsOIoN4bH/V14uwvNzK9TA247wtZzZZ6TPY/4CUli dfX+zDCHoZUZmazRBSmq84VgHUA8snRUz4jKFlYf8uWXPfo4OnhWxFXVmnCHHh4s UaNv7oFztjTxqnk8EjKavjbwFfUFm2M3cCsjTbUdGzFlJVprbtAnkaqaPzGoX8xC LYeFvsXltxtPoDYS2z0QzzRU6GuU/wd6DUN2g7c2ZgUCoEMv2kA4eHa/VXIJUD6h GpEnh6D0xo5hQ3mhChDd0LvX3p312I8e/5SFtP+kT7Ln0x7IdyxXND8DfpJ2dAjg +omvWLLkXNy6Y9PGD/XC6crfT5aJoA== =weol -----END PGP SIGNATURE----- --=-=-=-- From unknown Sat Jun 21 05:04:25 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38208] [PATCH] gnu: Add python-3.8. Resent-From: Tanguy Le Carrour Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Nov 2019 08:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38208 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Marius Bakke Cc: 38208@debbugs.gnu.org Received: via spool by 38208-submit@debbugs.gnu.org id=B38208.157415199313730 (code B ref 38208); Tue, 19 Nov 2019 08:27:02 +0000 Received: (at 38208) by debbugs.gnu.org; 19 Nov 2019 08:26:33 +0000 Received: from localhost ([127.0.0.1]:46554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWyqH-0003ZN-6o for submit@debbugs.gnu.org; Tue, 19 Nov 2019 03:26:33 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:60451) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWyqF-0003ZE-4Q for 38208@debbugs.gnu.org; Tue, 19 Nov 2019 03:26:31 -0500 X-Originating-IP: 176.159.32.89 Received: from localhost (176-159-32-89.abo.bbox.fr [176.159.32.89]) (Authenticated sender: tanguy@bioneland.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 05BC3E0008; Tue, 19 Nov 2019 08:26:28 +0000 (UTC) Date: Tue, 19 Nov 2019 09:26:28 +0100 From: Tanguy Le Carrour Message-ID: <20191119082628.2ysfzwpm4o7lpeln@rafflesia> References: <20191114084453.27042-1-tanguy@bioneland.org> <874kz5giav.fsf@devup.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <874kz5giav.fsf@devup.no> X-Spam-Score: -0.7 (/) 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: -1.7 (-) Hi Marius, Le 11/15, Marius Bakke a écrit : > Tanguy Le Carrour writes: > > ++ @unittest.skipIf(True, "This fails for unknown reasons on Guix") > > + def test_keyboard_interrupt_exit_code(self): > > + """KeyboardInterrupt triggers exit via SIGINT.""" > > + process = subprocess.run( > > I'm fairly confident that these failures are because stdin is not a > TTY. Can you try changing to this? > > @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device") > > It would be good to submit a patch along these lines upstream if that > works. Thanks for the snippet! It works! I've been trying for 2 days to register on https://bugs.python.org to submit this patch, but failed! :-( I'll keep on trying with different email addresses… Does this mean that we have to wait for upstream to integrate it, or can we use the patched wersion for Guix? Anyway, I'll update this patch according to your suggestion and push it. > > +(define-public python-3.8 > > + (package > > + (inherit python-3.7) > > + (version "3.8.0") > > + (source > > + (origin > > + (inherit (package-source python-3.7)) > > + (uri (string-append "https://www.python.org/ftp/python/" > > + version "/Python-" version ".tar.xz")) > > + (sha256 (base32 "110d0did9rxn7rg85kf2fwli5hqq44xv2d8bi7d92m7v2d728mmk")) > > + (patches (search-patches > > + "python-3.8-search-paths.patch" > > + "python-3-fix-tests.patch" > > + "python-3.8-fix-tests.patch" > > + "python-3-deterministic-build-info.patch")) > > + (snippet > > + '(begin > > + ;; Delete the bundled copy of libexpat. > > + (delete-file-recursively "Modules/expat") > > + (substitute* "Modules/Setup" > > + ;; Link Expat instead of embedding the bundled one. > > + (("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n")) > > + #t)))))) > > One final question... Do you know how stable the Python ABI is? Are > packages compiled with 3.7 guaranteed to work with 3.8? > > I wonder if we should 1) rename it to 'python-next', and 2) override > 'native-search-paths' so that it searches 'lib/python3.8/site-packages'. > > My concern is that e.g. 'guix environment --ad-hoc python python-numpy' > might stop working unless we rename it, and/or adjust search paths. > > If Python 3.8 is fully backwards compatible, we probably don't have to > do anything, otherwise we should adjust accordingly. I don't know anything about ABI, but what I read here: https://www.python.org/dev/peps/pep-0384/ So I guess it's been taken into consideration! I might have some time later this week to test using Python 3.8 as default Python. I'll let you know! Regards, -- Tanguy From unknown Sat Jun 21 05:04:25 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38208] [PATCH v2] gnu: Add python-3.8. References: <20191114084453.27042-1-tanguy@bioneland.org> In-Reply-To: <20191114084453.27042-1-tanguy@bioneland.org> Resent-From: Tanguy Le Carrour Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Nov 2019 08:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38208 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 38208@debbugs.gnu.org Cc: mbakke@fastmail.com, Tanguy Le Carrour Received: via spool by 38208-submit@debbugs.gnu.org id=B38208.157415347716019 (code B ref 38208); Tue, 19 Nov 2019 08:52:01 +0000 Received: (at 38208) by debbugs.gnu.org; 19 Nov 2019 08:51:17 +0000 Received: from localhost ([127.0.0.1]:46569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWzE9-0004AG-NH for submit@debbugs.gnu.org; Tue, 19 Nov 2019 03:51:17 -0500 Received: from relay12.mail.gandi.net ([217.70.178.232]:39733) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWzE5-0004A4-Af for 38208@debbugs.gnu.org; Tue, 19 Nov 2019 03:51:12 -0500 Received: from rafflesia.easter-eggs.fr (176-159-32-89.abo.bbox.fr [176.159.32.89]) (Authenticated sender: tanguy@bioneland.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 3BF11200015; Tue, 19 Nov 2019 08:51:06 +0000 (UTC) From: Tanguy Le Carrour Date: Tue, 19 Nov 2019 09:50:51 +0100 Message-Id: <20191119085051.22765-1-tanguy@bioneland.org> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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: -1.7 (-) * gnu/packages/python.scm (python-3.8): New public variable. [source]: Add patches to skip four tests. * gnu/packages/patches/python-3.8-search-paths.patch: New file. * gnu/packages/patches/python-3.8-fix-tests.patch: New file. --- .../patches/python-3.8-fix-tests.patch | 42 +++++++++++++++++++ .../patches/python-3.8-search-paths.patch | 17 ++++++++ gnu/packages/python.scm | 25 +++++++++++ 3 files changed, 84 insertions(+) create mode 100644 gnu/packages/patches/python-3.8-fix-tests.patch create mode 100644 gnu/packages/patches/python-3.8-search-paths.patch diff --git a/gnu/packages/patches/python-3.8-fix-tests.patch b/gnu/packages/patches/python-3.8-fix-tests.patch new file mode 100644 index 0000000000..45af383631 --- /dev/null +++ b/gnu/packages/patches/python-3.8-fix-tests.patch @@ -0,0 +1,42 @@ +diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py +index 1474624..887f8ee 100644 +--- a/Lib/test/_test_multiprocessing.py ++++ b/Lib/test/_test_multiprocessing.py +@@ -3801,6 +3801,7 @@ class _TestSharedMemory(BaseTestCase): + sms.close() + + @unittest.skipIf(os.name != "posix", "not feasible in non-posix platforms") ++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device") + def test_shared_memory_SharedMemoryServer_ignores_sigint(self): + # bpo-36368: protect SharedMemoryManager server process from + # KeyboardInterrupt signals. +diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py +index d41e94b..a1c15e7 100644 +--- a/Lib/test/test_signal.py ++++ b/Lib/test/test_signal.py +@@ -78,6 +78,7 @@ class PosixTests(unittest.TestCase): + self.assertLess(len(s), signal.NSIG) + + @unittest.skipUnless(sys.executable, "sys.executable required.") ++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device") + def test_keyboard_interrupt_exit_code(self): + """KeyboardInterrupt triggers exit via SIGINT.""" + process = subprocess.run( +@@ -128,6 +129,7 @@ class WindowsSignalTests(unittest.TestCase): + signal.signal(7, handler) + + @unittest.skipUnless(sys.executable, "sys.executable required.") ++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device") + def test_keyboard_interrupt_exit_code(self): + """KeyboardInterrupt triggers an exit using STATUS_CONTROL_C_EXIT.""" + # We don't test via os.kill(os.getpid(), signal.CTRL_C_EVENT) here +@@ -1245,6 +1247,7 @@ class StressTest(unittest.TestCase): + + class RaiseSignalTest(unittest.TestCase): + ++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device") + def test_sigint(self): + with self.assertRaises(KeyboardInterrupt): + signal.raise_signal(signal.SIGINT) +-- +2.23.0 diff --git a/gnu/packages/patches/python-3.8-search-paths.patch b/gnu/packages/patches/python-3.8-search-paths.patch new file mode 100644 index 0000000000..22e102ccbe --- /dev/null +++ b/gnu/packages/patches/python-3.8-search-paths.patch @@ -0,0 +1,17 @@ +diff --git a/setup.py b/setup.py +index 20d7f35..5751083 100644 +--- a/setup.py ++++ b/setup.py +@@ -676,8 +676,8 @@ class PyBuildExt(build_ext): + # if a file is found in one of those directories, it can + # be assumed that no additional -I,-L directives are needed. + if not CROSS_COMPILING: +- self.lib_dirs = self.compiler.library_dirs + system_lib_dirs +- self.inc_dirs = self.compiler.include_dirs + system_include_dirs ++ self.lib_dirs = os.getenv('LIBRARY_PATH', '').split(os.pathsep) ++ self.inc_dirs = os.getenv('CPATH', '').split(os.pathsep) + else: + # Add the sysroot paths. 'sysroot' is a compiler option used to + # set the logical path of the standard system headers and +-- +2.23.0 diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 644c9d7666..8a2d3e9721 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -57,6 +57,7 @@ ;;; Copyright © 2018, 2019 Maxim Cournoyer ;;; Copyright © 2018 Luther Thompson ;;; Copyright © 2018 Vagrant Cascadian +;;; Copyright © 2019 Tanguy Le Carrour ;;; ;;; This file is part of GNU Guix. ;;; @@ -408,6 +409,30 @@ data types.") (version-major+minor version) "/site-packages")))))))) +(define-public python-3.8 + (package + (inherit python-3.7) + (version "3.8.0") + (source + (origin + (inherit (package-source python-3.7)) + (uri (string-append "https://www.python.org/ftp/python/" + version "/Python-" version ".tar.xz")) + (sha256 (base32 "110d0did9rxn7rg85kf2fwli5hqq44xv2d8bi7d92m7v2d728mmk")) + (patches (search-patches + "python-3.8-search-paths.patch" + "python-3-fix-tests.patch" + "python-3.8-fix-tests.patch" + "python-3-deterministic-build-info.patch")) + (snippet + '(begin + ;; Delete the bundled copy of libexpat. + (delete-file-recursively "Modules/expat") + (substitute* "Modules/Setup" + ;; Link Expat instead of embedding the bundled one. + (("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n")) + #t)))))) + ;; Current 3.x version. (define-public python-3 python-3.7) -- 2.24.0 From unknown Sat Jun 21 05:04:25 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38208] Acknowledgement ([PATCH] gnu: Add python-3.8.) Resent-From: Tanguy Le Carrour Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Nov 2019 10:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38208 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 38208@debbugs.gnu.org Received: via spool by 38208-submit@debbugs.gnu.org id=B38208.15741596051946 (code B ref 38208); Tue, 19 Nov 2019 10:34:02 +0000 Received: (at 38208) by debbugs.gnu.org; 19 Nov 2019 10:33:25 +0000 Received: from localhost ([127.0.0.1]:46655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iX0p3-0000VK-Bc for submit@debbugs.gnu.org; Tue, 19 Nov 2019 05:33:25 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:56169) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iX0p1-0000VC-VH for 38208@debbugs.gnu.org; Tue, 19 Nov 2019 05:33:24 -0500 X-Originating-IP: 176.159.32.89 Received: from localhost (176-159-32-89.abo.bbox.fr [176.159.32.89]) (Authenticated sender: tanguy@bioneland.org) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 15863240008 for <38208@debbugs.gnu.org>; Tue, 19 Nov 2019 10:33:21 +0000 (UTC) Date: Tue, 19 Nov 2019 11:33:21 +0100 From: Tanguy Le Carrour Message-ID: <20191119103321.aaym4zv7xrqmnrte@rafflesia> References: <20191114084453.27042-1-tanguy@bioneland.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Score: 0.5 (/) 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: -0.5 (/) Patch submitted upstream: https://bugs.python.org/issue38845 From unknown Sat Jun 21 05:04:25 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38208] [PATCH] gnu: Add python-3.8. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Nov 2019 20:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38208 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tanguy Le Carrour Cc: 38208@debbugs.gnu.org Received: via spool by 38208-submit@debbugs.gnu.org id=B38208.15741967301903 (code B ref 38208); Tue, 19 Nov 2019 20:53:01 +0000 Received: (at 38208) by debbugs.gnu.org; 19 Nov 2019 20:52:10 +0000 Received: from localhost ([127.0.0.1]:48580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXATq-0000Ud-4k for submit@debbugs.gnu.org; Tue, 19 Nov 2019 15:52:10 -0500 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:44459) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXATl-0000U6-KO for 38208@debbugs.gnu.org; Tue, 19 Nov 2019 15:52:07 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 834BD4D8; Tue, 19 Nov 2019 15:51:59 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 19 Nov 2019 15:51:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm1; bh=YVRQHiG7qZsGivMuXAnqA4but0 IiGrWgC8FYaPirwxI=; b=q+nAWW6kgDMXKcYg2WBb07dQ8roEHs3cImF3mpADk4 eygS0os4n3QpT70TR64pow463avAFkv/leI2im4yrDzeYApK7W13g7js7n0Yqo2Q tQvcns2nD9eo563Z35uMKyw9Zfu8jiOyuFDkrGr7+hTGGm3OGy4fgGICRnA42O1v TlA+UZ6Dl3TbYBe09LOgN4CNffF3rXgHlzOqi7ewNoUVKlT/Ks2aToTKOh58BTOh 9XbMJE9IMcNZx2R3hWStwsuc1UpYHAysN6kqdG8rcsT2uMFUnGy7tKOOlWTYUpwR RuekepAVw+9drqihoa8CqbJ41Jvx3dowOVIuEG6giGEw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=YVRQHi G7qZsGivMuXAnqA4but0IiGrWgC8FYaPirwxI=; b=O/3shvvMDnxOuIUEYL2MlX XR3x+VaOT3Jal1HhSr4xBK3ucWwKhZKq8zjyDI/jov4TlEPN4OQuWTncPoIT49x0 UTITnBilQFSCLdY411gs/AgFfjl9cWf6Gv280V16q9jEr/8SvP0XvlZoyK3gVjqn AcvmOe5ltwXgl523Mx9dhV/Z7h2tqjaBoJrUQOpS5FB0aEXhfVQoiPCF79etzaE/ gO7kJdYQlNnMYmZVnz85LeincyqbVH6Ri593u6jLbL6okbwyM9jl104xEa0iaHbX AgZGRayJqFmoMnCSzPtUucxO/OzBJD8GtaZPA4au4DynPYT/TM/5eD6vIaDBCFUw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudegkedgudegfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffujghffgffkfggtgesghdtreertderjeenucfhrhhomhepofgrrhhi uhhsuceurghkkhgvuceomhgsrghkkhgvsehfrghsthhmrghilhdrtghomheqnecuffhomh grihhnpehphihthhhonhdrohhrghenucfkphepiedvrdduiedrudelvddrudehtdenucfr rghrrghmpehmrghilhhfrhhomhepmhgsrghkkhgvsehfrghsthhmrghilhdrtghomhenuc evlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from localhost (ti0006q161-0149.bb.online.no [62.16.192.150]) by mail.messagingengine.com (Postfix) with ESMTPA id 350EB3060074; Tue, 19 Nov 2019 15:51:58 -0500 (EST) From: Marius Bakke In-Reply-To: <20191119082628.2ysfzwpm4o7lpeln@rafflesia> References: <20191114084453.27042-1-tanguy@bioneland.org> <874kz5giav.fsf@devup.no> <20191119082628.2ysfzwpm4o7lpeln@rafflesia> User-Agent: Notmuch/0.29.1 (https://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Tue, 19 Nov 2019 21:51:56 +0100 Message-ID: <8736eja8sz.fsf@devup.no> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) 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: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Tanguy Le Carrour writes: > Hi Marius, > > > Le 11/15, Marius Bakke a =C3=A9crit : >> Tanguy Le Carrour writes: >> > ++ @unittest.skipIf(True, "This fails for unknown reasons on Guix") >> > + def test_keyboard_interrupt_exit_code(self): >> > + """KeyboardInterrupt triggers exit via SIGINT.""" >> > + process =3D subprocess.run( >>=20 >> I'm fairly confident that these failures are because stdin is not a >> TTY. Can you try changing to this? >>=20 >> @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a T= TY device") >>=20 >> It would be good to submit a patch along these lines upstream if that >> works. > > Thanks for the snippet! It works! > > I've been trying for 2=C2=A0days to register on https://bugs.python.org t= o submit > this patch, but failed! :-( > I'll keep on trying with different email addresses=E2=80=A6 Excellent, thank you very much for taking care of this. There are five other tests skipped for the same reason in 'python-3-fix-tests.patch', can you include those in the upstream pull request? > Does this mean that we have to wait for upstream to integrate it, or can > we use the patched wersion for Guix? I think the patch looks OK, but looking forward to hear upstreams take on it. In any case, it should not be a blocker. > Anyway, I'll update this patch according to your suggestion and push it. Push it to this bug report, presumably? :-) >> One final question... Do you know how stable the Python ABI is? Are >> packages compiled with 3.7 guaranteed to work with 3.8? >>=20 >> I wonder if we should 1) rename it to 'python-next', and 2) override >> 'native-search-paths' so that it searches 'lib/python3.8/site-packages'. >>=20 >> My concern is that e.g. 'guix environment --ad-hoc python python-numpy' >> might stop working unless we rename it, and/or adjust search paths. >>=20 >> If Python 3.8 is fully backwards compatible, we probably don't have to >> do anything, otherwise we should adjust accordingly. > > I don't know anything about ABI, but what I read here: > https://www.python.org/dev/peps/pep-0384/ > So I guess it's been taken into consideration! Cool, thanks for the link. So it is safe to swap out Python 3.7 with 3.8 "in-place". However I think we should still call it differently, because the new Python won't necessarily be compatible with all the manifests/environments out there that reference Python by name. So if you send a patch that adds (name "python-next") to the inherited Python package, I think we are all set. Thank you! > I might have some time later this week to test using Python 3.8 as > default Python. I'll let you know! Great, good luck! I suspect you'll have to update many of the 'core' Python packages along the way; feel free to drop by #guix on Freenode if you get stuck anywhere. :-) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl3UVewACgkQoqBt8qM6 VPpctwf/dKk7tezwPT3VQIMWq4qBNTyGdIUYTFI9MFXzAatPfLnwcjforiDQjq2y zveBXxhB6GZrcn81k83gt/N3WpMS0+k0NVafQmcDfaVttH0gnmUymsFKPxyVxF8B dSYM7DE65F+DOzA2OrkIEmgjOii682X57T6cI41lLBq9xW7DeeSbFnVJW5+AnFfK 2mkpC2lbEldOa/BeMw2S7yy0x9ux2RXm5YB/fpOoSvMTtJMxYDGjE0xuJbu6Q/0c bA2uCdG0kFErldy7JWdjPn6ZpKsc+kv/+EH+ktIVTCMhD5Ip9Wri9RLoQxMqpJ/A lgRK0dKJjwOfM9iyqOPnNHV15YTGsw== =9QNM -----END PGP SIGNATURE----- --=-=-=-- From unknown Sat Jun 21 05:04:25 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Tanguy Le Carrour Subject: bug#38208: closed (Re: [PATCH v2] gnu: Add python-3.8.) Message-ID: References: <87zhgr8u40.fsf@devup.no> <20191114084453.27042-1-tanguy@bioneland.org> X-Gnu-PR-Message: they-closed 38208 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 38208@debbugs.gnu.org Date: Tue, 19 Nov 2019 20:55:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1574196903-2220-1" This is a multi-part message in MIME format... ------------=_1574196903-2220-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #38208: [PATCH] gnu: Add python-3.8. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 38208@debbugs.gnu.org. --=20 38208: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D38208 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1574196903-2220-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 38208-done) by debbugs.gnu.org; 19 Nov 2019 20:54:50 +0000 Received: from localhost ([127.0.0.1]:48597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXAWP-0000ZM-F1 for submit@debbugs.gnu.org; Tue, 19 Nov 2019 15:54:50 -0500 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:57369) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXAWN-0000Z5-6l for 38208-done@debbugs.gnu.org; Tue, 19 Nov 2019 15:54:47 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 71F8C4D8; Tue, 19 Nov 2019 15:54:41 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 19 Nov 2019 15:54:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm1; bh=uh72PWtswMqRKUASRb5d1jiL96 Ln66cc7FZoKU2Bu3w=; b=MHDAsDc8WRKEriLOk8zgmCOmJuPD/Ld8GAzjrrl5x3 P7jyMYWra9/RiKwJHE1DEiw3soQlkUESXNK9rUNB4Xj1rF5DO1XUGEPntodYiNu2 27x1ncu6HLDEi/s4MnWuv1E56TXCsgUePYQhkoFZSWpB7Kh3ZBxgI2lfEX2bG5Di IQtI2YVh+IzoJjbPuW1nL6Ja56SgCxmuAF46G4Ti22Car1Nthq8ZVisTIc95DDs3 8Ts/TuGaPPutdj/Quidxjb4JrX+19Fiesk8gv0YqpwyS3NmYL8vHVvpo3k+y7ZA7 HbV2WesmeqhfX2rTBjNkjhi2lOMpZMJap0TAVzez5fbA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=uh72PW tswMqRKUASRb5d1jiL96Ln66cc7FZoKU2Bu3w=; b=MsRcKLIenjCXCSqBRjJJy8 fWibbt1KixI7kkCwROat+nE7BzJnE7F87T+P4mtouLVCh8qemdhaMA84CVLH24AO YdDiUgIwoqWwV1ruzq2eQHcdHbzL2N5fMuohL38rBNqmCBvT/4gqu/ZbP+knR41h 1l9/rHUC6VOUIWNdkA+mDcKxPffGlL3ZytBGW4dRLcOm8vkqGivnCc5wgcRLNYD/ m6dmew8vSCRtQuLgJ9xmxzXiy37sC3Cpq6t765pgPAbpSi1J+0uEM96IhTd1X7Vt xa8oR8Z5OyP6zDcXO6xyf2BY+w1+Z/qf31acFeG7HdosoIYa3+JHs1mLfXJiPQNQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudegkedgudeggecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffujghffgffkfggtgesghdtreertdertdenucfhrhhomhepofgrrhhi uhhsuceurghkkhgvuceomhgsrghkkhgvsehfrghsthhmrghilhdrtghomheqnecukfhppe eivddrudeirdduledvrdduhedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmsggrkhhk vgesfhgrshhtmhgrihhlrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from localhost (ti0006q161-0149.bb.online.no [62.16.192.150]) by mail.messagingengine.com (Postfix) with ESMTPA id 8A3B0306005E; Tue, 19 Nov 2019 15:54:40 -0500 (EST) From: Marius Bakke To: Tanguy Le Carrour , 38208-done@debbugs.gnu.org Subject: Re: [PATCH v2] gnu: Add python-3.8. In-Reply-To: <20191119085051.22765-1-tanguy@bioneland.org> References: <20191119085051.22765-1-tanguy@bioneland.org> User-Agent: Notmuch/0.29.1 (https://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Tue, 19 Nov 2019 21:54:39 +0100 Message-ID: <87zhgr8u40.fsf@devup.no> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 38208-done Cc: Tanguy Le Carrour 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: -1.7 (-) --=-=-= Content-Type: text/plain Hi Tanguy, Whoops, did not notice this patch in my previous message! I've applied it with the name change as suggested. Thank you! --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl3UVo8ACgkQoqBt8qM6 VPoHEAgAjPdb8yKDZYVra3P9ISaofj25aEfgDNpBdnHMiu0JkcF5gCF/w4MDazQP FhlhAcyZqbVI8BXJpWZbrUqEKXMKUBk6a0AO38C/lO09pLVzjfDbCgESO36aCE6N leM/E2eH/TKZmQ2OZAhjBeq5KrNhWY/bEIKzu3cWpN1JdOTLpE/ppdhCe/5elUxG hAjI44WR7SU2yFHTSMUM15M9nFRH0PrJ4OldEXq6Xk5pbAVRywi+Atv/bgjR8FlJ 9z61Z4qlLym70UV0CBlEg5YUOq6wdquhsWU2dG2RjKVsB3AAQ99Uv5zyruurKKtK qPA3xrOHe3/k6nBHM+IYM7fgFgC/Yg== =EMTI -----END PGP SIGNATURE----- --=-=-=-- ------------=_1574196903-2220-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 14 Nov 2019 08:45:30 +0000 Received: from localhost ([127.0.0.1]:60913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVAkn-0006QR-3q for submit@debbugs.gnu.org; Thu, 14 Nov 2019 03:45:30 -0500 Received: from lists.gnu.org ([209.51.188.17]:48110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVAkl-0006QK-Tq for submit@debbugs.gnu.org; Thu, 14 Nov 2019 03:45:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50866) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVAkk-0002RW-8L for guix-patches@gnu.org; Thu, 14 Nov 2019 03:45:23 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_40,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iVAki-0004Rn-Lh for guix-patches@gnu.org; Thu, 14 Nov 2019 03:45:22 -0500 Received: from relay12.mail.gandi.net ([217.70.178.232]:40459) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iVAki-0004Pt-Cc for guix-patches@gnu.org; Thu, 14 Nov 2019 03:45:20 -0500 Received: from rafflesia.easter-eggs.fr (176-159-32-89.abo.bbox.fr [176.159.32.89]) (Authenticated sender: tanguy@bioneland.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 0D44E200011; Thu, 14 Nov 2019 08:45:17 +0000 (UTC) From: Tanguy Le Carrour To: guix-patches@gnu.org Subject: [PATCH] gnu: Add python-3.8. Date: Thu, 14 Nov 2019 09:44:53 +0100 Message-Id: <20191114084453.27042-1-tanguy@bioneland.org> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.70.178.232 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: Tanguy Le Carrour 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 (---) * gnu/packages/python.scm (python-3.8): New public variable. [source]: Add patches to skip four tests. * gnu/packages/patches/python-3.8-search-paths.patch: New file. * gnu/packages/patches/python-3.8-fix-tests.patch: New file. --- .../patches/python-3.8-fix-tests.patch | 42 +++++++++++++++++++ .../patches/python-3.8-search-paths.patch | 17 ++++++++ gnu/packages/python.scm | 25 +++++++++++ 3 files changed, 84 insertions(+) create mode 100644 gnu/packages/patches/python-3.8-fix-tests.patch create mode 100644 gnu/packages/patches/python-3.8-search-paths.patch diff --git a/gnu/packages/patches/python-3.8-fix-tests.patch b/gnu/packages/patches/python-3.8-fix-tests.patch new file mode 100644 index 0000000000..bea311992a --- /dev/null +++ b/gnu/packages/patches/python-3.8-fix-tests.patch @@ -0,0 +1,42 @@ +diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py +index 1474624..887f8ee 100644 +--- a/Lib/test/_test_multiprocessing.py ++++ b/Lib/test/_test_multiprocessing.py +@@ -3801,6 +3801,7 @@ class _TestSharedMemory(BaseTestCase): + sms.close() + + @unittest.skipIf(os.name != "posix", "not feasible in non-posix platforms") ++ @unittest.skipIf(True, "This fails for unknown reasons on Guix") + def test_shared_memory_SharedMemoryServer_ignores_sigint(self): + # bpo-36368: protect SharedMemoryManager server process from + # KeyboardInterrupt signals. +diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py +index d41e94b..a1c15e7 100644 +--- a/Lib/test/test_signal.py ++++ b/Lib/test/test_signal.py +@@ -78,6 +78,7 @@ class PosixTests(unittest.TestCase): + self.assertLess(len(s), signal.NSIG) + + @unittest.skipUnless(sys.executable, "sys.executable required.") ++ @unittest.skipIf(True, "This fails for unknown reasons on Guix") + def test_keyboard_interrupt_exit_code(self): + """KeyboardInterrupt triggers exit via SIGINT.""" + process = subprocess.run( +@@ -128,6 +129,7 @@ class WindowsSignalTests(unittest.TestCase): + signal.signal(7, handler) + + @unittest.skipUnless(sys.executable, "sys.executable required.") ++ @unittest.skipIf(True, "This fails for unknown reasons on Guix") + def test_keyboard_interrupt_exit_code(self): + """KeyboardInterrupt triggers an exit using STATUS_CONTROL_C_EXIT.""" + # We don't test via os.kill(os.getpid(), signal.CTRL_C_EVENT) here +@@ -1245,6 +1247,7 @@ class StressTest(unittest.TestCase): + + class RaiseSignalTest(unittest.TestCase): + ++ @unittest.skipIf(True, "This fails for unknown reasons on Guix") + def test_sigint(self): + with self.assertRaises(KeyboardInterrupt): + signal.raise_signal(signal.SIGINT) +-- +2.23.0 diff --git a/gnu/packages/patches/python-3.8-search-paths.patch b/gnu/packages/patches/python-3.8-search-paths.patch new file mode 100644 index 0000000000..22e102ccbe --- /dev/null +++ b/gnu/packages/patches/python-3.8-search-paths.patch @@ -0,0 +1,17 @@ +diff --git a/setup.py b/setup.py +index 20d7f35..5751083 100644 +--- a/setup.py ++++ b/setup.py +@@ -676,8 +676,8 @@ class PyBuildExt(build_ext): + # if a file is found in one of those directories, it can + # be assumed that no additional -I,-L directives are needed. + if not CROSS_COMPILING: +- self.lib_dirs = self.compiler.library_dirs + system_lib_dirs +- self.inc_dirs = self.compiler.include_dirs + system_include_dirs ++ self.lib_dirs = os.getenv('LIBRARY_PATH', '').split(os.pathsep) ++ self.inc_dirs = os.getenv('CPATH', '').split(os.pathsep) + else: + # Add the sysroot paths. 'sysroot' is a compiler option used to + # set the logical path of the standard system headers and +-- +2.23.0 diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 644c9d7666..8a2d3e9721 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -57,6 +57,7 @@ ;;; Copyright © 2018, 2019 Maxim Cournoyer ;;; Copyright © 2018 Luther Thompson ;;; Copyright © 2018 Vagrant Cascadian +;;; Copyright © 2019 Tanguy Le Carrour ;;; ;;; This file is part of GNU Guix. ;;; @@ -408,6 +409,30 @@ data types.") (version-major+minor version) "/site-packages")))))))) +(define-public python-3.8 + (package + (inherit python-3.7) + (version "3.8.0") + (source + (origin + (inherit (package-source python-3.7)) + (uri (string-append "https://www.python.org/ftp/python/" + version "/Python-" version ".tar.xz")) + (sha256 (base32 "110d0did9rxn7rg85kf2fwli5hqq44xv2d8bi7d92m7v2d728mmk")) + (patches (search-patches + "python-3.8-search-paths.patch" + "python-3-fix-tests.patch" + "python-3.8-fix-tests.patch" + "python-3-deterministic-build-info.patch")) + (snippet + '(begin + ;; Delete the bundled copy of libexpat. + (delete-file-recursively "Modules/expat") + (substitute* "Modules/Setup" + ;; Link Expat instead of embedding the bundled one. + (("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n")) + #t)))))) + ;; Current 3.x version. (define-public python-3 python-3.7) -- 2.24.0 ------------=_1574196903-2220-1--