From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Allan Webber Subject: Re: Python 3.5 start of update Date: Wed, 22 Jun 2016 08:15:02 -0500 Message-ID: <87k2hhtlex.fsf@dustycloud.org> References: <3746864.VkbyMe6eV1@myrada> <20160304031506.GC30676@jasmine> <1457160701.30082.22.camel@ghic.org> <1457419942.28654.19.camel@ghic.org> <87mvmetukz.fsf@dustycloud.org> <87ziqekz75.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60502) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFhzz-0000hu-Ez for guix-devel@gnu.org; Wed, 22 Jun 2016 09:15:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFhzu-000569-R8 for guix-devel@gnu.org; Wed, 22 Jun 2016 09:15:18 -0400 In-reply-to: <87ziqekz75.fsf@gnu.org> 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+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org Ludovic Court=C3=A8s writes: >> From bbc1f68204318d79ece3fa46ed71d7c21d6ec8a2 Mon Sep 17 00:00:00 2001 >> From: Christopher Allan Webber >> Date: Fri, 29 Apr 2016 17:53:50 -0500 >> Subject: [PATCH] gnu: Add geiser-next. > > Oops. ;-) Oops indeed... I'll attach the right first of 2 patches when I get the next commit in. >> From ec0797ceaed8f20b4dbbfb8fb96b2c4752e93f2e Mon Sep 17 00:00:00 2001 >> From: Diane Trout >> Date: Tue, 21 Jun 2016 09:22:43 -0500 >> Subject: [PATCH 2/2] gnu: Add python-3.5. >> >> * gnu/packages/python.scm (python-3.5): New variable. >> (python-3.4): Inherit from python-3.5. >> (python-3): Switched alias to point to python-3.5. >> (python-minimal): Use the system-ffi as without-system-ffi caused th= e build >> to fail when trying to import _ctypes. >> * gnu/packages/patches/python-fix-tests-py3.5.patch: >> New file. Patch Lib/test/test_pathlib.py to skip test_expanduser. >> Patch Lib/test/test_tarfile.py to ignore pwd.getpwuid and grp.getgrg= id tests >> for user root being of id 0. > > Feel free to add a =E2=80=9CCo-authored-by=E2=80=9D tag if you think it= =E2=80=99s relevant. Oh I didn't know about that... will do. >> diff --git a/gnu/packages/patches/python-fix-tests-py3.5.patch b/gnu/p= ackages/patches/python-fix-tests-py3.5.patch >> new file mode 100644 >> index 0000000..47dded4 >> --- /dev/null >> +++ b/gnu/packages/patches/python-fix-tests-py3.5.patch >> @@ -0,0 +1,35 @@ >> +Additional test fixes which affect Python 3.5 (and presumably later) = but not >> +prior revisions of Python. >> + >> +--- Lib/test/test_pathlib.py 2014-03-01 03:02:36.088311000 +0100 >> ++++ Lib/test/test_pathlib.py 2014-03-01 04:56:37.768311000 +0100 >> +@@ -1986,8 +1986,9 @@ >> + expect =3D set() if not support.fs_is_case_insensitive(BASE)= else given >> + self.assertEqual(given, expect) >> + self.assertEqual(set(p.rglob("FILEd*")), set()) >> +=20 >> ++ @unittest.skipIf(True, "Guix builder home is '/' which causes tr= ouble for these tests") > > Could it be that adding a phase that does (setenv "HOME" (getcwd)) woul= d > help? A good idea, will give it a try! >> +--- Lib/test/test_tarfile.py 2016-02-24 19:22:52.597208055 +00= 00 >> ++++ Lib/test/test_tarfile.py 2016-02-24 20:50:48.941950135 +0000 >> +@@ -2305,11 +2305,14 @@ >> + try: >> + import pwd, grp >> + except ImportError: >> + return False >> +- if pwd.getpwuid(0)[0] !=3D 'root': >> +- return False >> +- if grp.getgrgid(0)[0] !=3D 'root': >> ++ try: >> ++ if pwd.getpwuid(0)[0] !=3D 'root': >> ++ return False >> ++ if grp.getgrgid(0)[0] !=3D 'root': >> ++ return False >> ++ except KeyError: >> + return False >> + return True > > (I was skeptical about this bit so I tried this: > > --8<---------------cut here---------------start------------->8--- > store-monad@(guile-user) [1]> (gexp->derivation "foo" > #~(call-with-output-file #$output > (lambda (port) > (write (list (false-if-exception (getpwuid 0)) > (false-if-exception (getgrgid 0))) > port)))) > $6 =3D # /gnu/store/fr9klqdkfqz8ayiq1fjq5i468qjx39mc-foo 42843c0> > store-monad@(guile-user) [1]> (built-derivations (list $6)) > substitute: updating list of substitutes from 'https://mirror.hydra.gnu= .org'... 100.0% > building path(s) `/gnu/store/fr9klqdkfqz8ayiq1fjq5i468qjx39mc-foo' > $7 =3D #t > --8<---------------cut here---------------end--------------->8--- > > =E2=80=A6 and indeed, we get (#f #f). No wonder because libstore/build= .cc > does not add any entry for =E2=80=9Croot=E2=80=9D in /etc/passwd. Prob= ably worth fixing > someday.) Heh :) Is it worth filing a bug? > Other than that, LGTM! > > The big frustration is that we=E2=80=99ll have to open a =E2=80=98pytho= n-updates=E2=80=99 > branch, where we can also add Hartmut=E2=80=99s changes, but we=E2=80=99= ll have to wait > until =E2=80=98core-updates=E2=80=99 is merged before we can start buil= ding it, which > could take another week or so. Makes sense. It'll be worth it! I'll try to get the rest of this done this afternoon, but it might happen sometime later this week. - Chris