Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 84034200D43 for ; Tue, 7 Nov 2017 04:42:50 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 82A90160C00; Tue, 7 Nov 2017 03:42:50 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CE142160BEC for ; Tue, 7 Nov 2017 04:42:49 +0100 (CET) Received: (qmail 60468 invoked by uid 500); 7 Nov 2017 03:42:48 -0000 Mailing-List: contact dev-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@subversion.apache.org Received: (qmail 60445 invoked by uid 99); 7 Nov 2017 03:42:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Nov 2017 03:42:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id BD942CA928; Tue, 7 Nov 2017 03:42:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id QoNlYh7asioq; Tue, 7 Nov 2017 03:42:46 +0000 (UTC) Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 7A5DF5FE64; Tue, 7 Nov 2017 03:42:46 +0000 (UTC) Received: by mail-wm0-f51.google.com with SMTP id y80so931806wmd.0; Mon, 06 Nov 2017 19:42:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=prnlk7lP2Tr+pFiFN7kaBv5IrUP4kSeGZq5e4bpr7ik=; b=oIKXh1wtnOUEqQQPGE4sZwweJHdqVGwA7dLySviAlReT8nvjglAzAqaGv705bjBH5o /lmYKXsgEhgos9/fs7BGh0MCpB0GgqkX6SFL18MsBhZmn3YPptbcESUxa4j/0RTxNtln i+XEEWljrEzrR7xhxNpPbtL71jxc23u6H+NQ85/dp7vg+rd52t0u6Eyjlgk5Z+SnjHIx 6Hsmpx89SqsKJIMnyQPogiIp5Gu/qKIlJEJn7c2rb7jg8fnoH0BqmvkTLYjVdxs335TM 5xhijxr1yBiVPuu79sz1FcVYgL953RD1QBg6PX6N1Ug7kckvdFrC2iL2ssKrvXPrFpza +ulQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=prnlk7lP2Tr+pFiFN7kaBv5IrUP4kSeGZq5e4bpr7ik=; b=EABSMi8GeQKMJk2B1sk1qKmYIEBafLGg//UBUtz5eOOlZ9C7qsY3UHqLhliwm7gIlZ LULr2h6z9JyY0vMv1O7EvJfgXr3Zkc70GQoe5O5kAlU+f1ajFFDSr13eRgEGqhdr+xPM 8xkygCM1VoxV2ONZdEdk01zQ80663VKOGlMbnSX00LANZnKidAtjUn+4ngozAYKlN34d lvdQHHDTFnU7Q8j/Jf0naXlqYQr1Md3j3HNkPI2r2r6ahcKxfQ5Ik3HI9Mm5sq75TmyG KP8mcFSza4dAsUImTiFBm8Yf5Ln5pHOfmeI52M59E41RL8k9TLcZQVeACkit3iQA8CFo Lutg== X-Gm-Message-State: AMCzsaWkjBnbPjBCCwX2DPkW/eKQlaGGxT69rQTMzwMyum22G1eWSBlG nwYafFakACsyinSVoGxZQnxzZx4ja5cnnx3eyMAHBw== X-Google-Smtp-Source: ABhQp+QfNnWEQJsmGHWY7OzklnXp9oCq3P3MSKXBlhZ6MWnk1AcaUiNIinnIQXwnQ6+E/168o0iJOHbVXCzehzEAh6Y= X-Received: by 10.80.245.129 with SMTP id u1mr23277494edm.232.1510026166166; Mon, 06 Nov 2017 19:42:46 -0800 (PST) MIME-Version: 1.0 References: <20171106015822.C61AC3A028D@svn01-us-west.apache.org> <1509975202.257734.1163081224.387F1192@webmail.messagingengine.com> In-Reply-To: <1509975202.257734.1163081224.387F1192@webmail.messagingengine.com> From: Troy Curtis Jr Date: Tue, 07 Nov 2017 03:42:35 +0000 Message-ID: Subject: Re: svn commit: r1814386 - in /subversion/branches/swig-py3: build/generator/swig/ build/generator/util/ subversion/bindings/swig/python/svn/ subversion/bindings/swig/python/tests/ subversion/bindings/swig/python/tests/trac/versioncontrol/ subversion/bindi... To: Daniel Shahaf Cc: dev@subversion.apache.org, troycurtisjr@apache.org, commits@subversion.apache.org Content-Type: multipart/alternative; boundary="94eb2c0924e23c6a9a055d5c5d92" archived-at: Tue, 07 Nov 2017 03:42:50 -0000 --94eb2c0924e23c6a9a055d5c5d92 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Nov 6, 2017 at 7:33 AM Daniel Shahaf wrote= : > troycurtisjr@apache.org wrote on Mon, 06 Nov 2017 01:58 +0000: > > +++ > subversion/branches/swig-py3/subversion/bindings/swig/python/tests/trac/v= ersioncontrol/tests/svn_fs.py > Mon Nov 6 01:58:20 2017 > > @@ -53,17 +53,19 @@ import shutil > > if sys.version_info[0] >=3D 3: > =E2=8B=AE > > else: > > # Python <3.0 > > try: > > - from cStringIO import StringIO > > + from io import StringIO > > except ImportError: > > - from StringIO import StringIO > > + from io import StringIO > > Is this intended to catch transient disk errors or something? :-) > Transient gray matter errors? Looks like I missed an unnecessary 2to3 conversion. And since it happens to work in 2.7 now, I had no import errors! The whole block can be simplified a bit now that 2.7 is the minimum version. > > @@ -246,21 +249,21 @@ class SubversionRepositoryTestCase(unitt > > diffs =3D self.repos.get_deltas('trunk/README.txt', 2, > 'trunk/README.txt', 3) > > self._cmp_diff((('trunk/README.txt', 2), > > ('trunk/README.txt', 3), > > - (Node.FILE, Changeset.EDIT)), diffs.next()) > > - self.assertRaises(StopIteration, diffs.next) > > + (Node.FILE, Changeset.EDIT)), next(diffs)) > > + self.assertRaises(StopIteration, lambda *args: next(diffs)) > > Should this be "lambda: next(diffs)" without variadicity? > I don't have a good explanation for this. I distinctly remember having syntax errors trying to do just that, and running across the '*args' method in my search for the right syntax...however your syntax works perfectly find in both my 2.7 and 3.6. I also did not find the web reference for '*args' again that I seem to remember. More transient gray matter errors perhaps!? I'll get that fixed up as well. Thanks for the review! Troy --94eb2c0924e23c6a9a055d5c5d92 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon= , Nov 6, 2017 at 7:33 AM Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
= troycurtisjr@apache.org wrote on Mon, 06 Nov 2017 01:58 +0000:
> +++ subversion/branches/swig-py3/subversion/bindings/swig/python/tests= /trac/versioncontrol/tests/svn_fs.py Mon Nov=C2=A0 6 01:58:20 2017
> @@ -53,17 +53,19 @@ import shutil
>=C2=A0 if sys.version_info[0] >=3D 3:
=E2=8B=AE
>=C2=A0 else:
>=C2=A0 =C2=A0 # Python <3.0
>=C2=A0 =C2=A0 try:
> -=C2=A0 =C2=A0 from cStringIO import StringIO
> +=C2=A0 =C2=A0 from io import StringIO
>=C2=A0 =C2=A0 except ImportError:
> -=C2=A0 =C2=A0 from StringIO import StringIO
> +=C2=A0 =C2=A0 from io import StringIO

Is this intended to catch transient disk errors or something? :-)

Transient gray matter errors?=C2=A0 Looks like I= missed an unnecessary 2to3 conversion. And since it happens to work in 2.7= now, I had no import errors!=C2=A0 The whole block can be simplified a bit= now that 2.7 is the minimum version.
=C2=A0
> @@ -246,21 +249,21 @@ class SubversionRepositoryTestCase(unitt
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 diffs =3D self.repos.get_deltas('= ;trunk/README.txt', 2, 'trunk/README.txt', 3)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self._cmp_diff((('trunk/README.t= xt', 2),
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 ('trunk/README.txt', 3),
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 (Node.FILE, Changeset.EDIT)), diffs.next())
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.assertRaises(StopIteration, diffs.ne= xt)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 (Node.FILE, Changeset.EDIT)), next(diffs))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.assertRaises(StopIteration, lambda *= args: next(diffs))

Should this be "lambda: next(diffs)" without variadicity?

I don't have a good explanation for th= is.=C2=A0 I distinctly remember having syntax errors trying to do just that= , and running across the '*args' method in my search for the right = syntax...however your syntax works perfectly find in both my 2.7 and 3.6.= =C2=A0 I also did not find the web reference for '*args' again that= I seem to remember.=C2=A0 More transient gray matter errors perhaps!?=C2= =A0 I'll get that fixed up as well.

Thanks for the re= view!
Troy
=C2=A0
--94eb2c0924e23c6a9a055d5c5d92--