From dev-return-37456-archive-asf-public=cust-asf.ponee.io@subversion.apache.org Sun Feb 11 23:29:30 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id BDC5A18064E for ; Sun, 11 Feb 2018 23:29:30 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 9DC86160C4E; Sun, 11 Feb 2018 22:29:30 +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 E2647160C2E for ; Sun, 11 Feb 2018 23:29:29 +0100 (CET) Received: (qmail 91944 invoked by uid 500); 11 Feb 2018 22:29:28 -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 91933 invoked by uid 99); 11 Feb 2018 22:29:28 -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; Sun, 11 Feb 2018 22:29:28 +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 CDB0EC16B2 for ; Sun, 11 Feb 2018 22:29:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.82 X-Spam-Level: X-Spam-Status: No, score=-0.82 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=daniel.shahaf.name header.b=nnvKsnDZ; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=fobCwDjH Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id mB6I1qQi4yLg for ; Sun, 11 Feb 2018 22:29:27 +0000 (UTC) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 6DC075F178 for ; Sun, 11 Feb 2018 22:29:26 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 0346B20B2E; Sun, 11 Feb 2018 17:29:20 -0500 (EST) Received: from web6 ([10.202.2.216]) by compute3.internal (MEProxy); Sun, 11 Feb 2018 17:29:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=xIatiu Is+WpWea0Gg3a1cUwp8JqbBU9E+Rr/tbXmAoY=; b=nnvKsnDZjQHFRbaXhRH18Q nzhlRp3EIsWANHFtHvCpoQ4MdxF4LAzMj/DXJ6y6RJICET0Xw60pRgPNxHoB9NZ2 BACMi4hSZ6QwS82AORunH+WyqM89Znb7qwWnpzpHwePsMGn3GfIZs6BcqiUV9073 ecNktiqXM9PEUpHdiFCFL8jk7Hkp+PhWG3+hf069Co6bIw3qkDFhKzrPzqr6J7yY pWxqSRjbgABpgM9uAtw8NpHGWepDYdJP7kkjOAe7DuhDkTjO6awwqc+jqCCRy1w+ 1QEKb1XXIuOcei/XTHfTr7AdxhBknudxWCny4DDACtGpBhyCbdAftvrcaETA6/hA == DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=xIatiu Is+WpWea0Gg3a1cUwp8JqbBU9E+Rr/tbXmAoY=; b=fobCwDjHCU9UwWJFExr3AW l0eEPh1MGXM/ZaIL5LERk3Tgq/Zp7jF8iu9sXGW0XihWCSo4lb+1xQyjmtoJDD9D Sc36O2WTVXAOcJebEqwGT9F0bQE6PGJaspafEsae9rw0blTLnz4DY4CIBzlJ6XtP wpeweiYC9No4PlUyBVOYXkWMFNLPYM95/2N0dchDW0QJ0x6txjzQZhQNMCVfOJcW har4nePBqRc+9teE0j/K3zRCh4pWgFoWbd+2u61O+h8EoQ/6OGtQsljsVJhT97Fn kGxw3VreGXuUOArtcrmzVjJxtj5iCwJA70NlnShAeIwRVwE4jqEAuxRVMiFxTA4A == X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id D16184145; Sun, 11 Feb 2018 17:29:19 -0500 (EST) Message-Id: <1518388159.325256.1267267080.12A8C91B@webmail.messagingengine.com> From: Daniel Shahaf To: Troy Curtis Jr Cc: Kenneth Porter , dev@subversion.apache.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-fde26eb3 References: <0cb91b9d-8672-2975-4b5f-a921e1727e03@sewingwitch.com> <3CDAB57F7ADD5234EEA3043C@172.27.234.209> <8ffda743-7920-6e9a-72c5-7805d18c6210@sewingwitch.com> <524BBA64291DF40676325FEB@[172.27.234.209]> <7735A53A42D7935FE2BD56C4@172.27.234.209> <1518093331.641374.1263928216.4F1456A6@webmail.messagingengine.com> <7341de56-a382-b6d9-9806-dcfa9293d56a@sewingwitch.com> <1518338308.45878.1266811872.0A2C9D5E@webmail.messagingengine.com> In-Reply-To: Subject: Re: mailer.py commit says TypeError: must be unicode, not str Date: Sun, 11 Feb 2018 22:29:19 +0000 Troy Curtis Jr wrote on Sun, 11 Feb 2018 14:27 +0000: > All this being said, I'm fine reverting the import swap if that is what is > desired, as all indications are that it works either way now. I simply > liked the communication of intent better with this order. I think the primary reason for the 'try: import py3name...' convention is to make the code a little faster in the common case, which is presumed to be the newer language version. I'm not sure whether the difference is significant enough to be worth the churn of another commit unchanging the order. It certainly isn't significant enough to block the backport (the bugfix outweighs it by orders of magnitude). I'm not sure I understand exactly in what way you see the order in HEAD as better. As I see it, the code wants to import the module that's known as '__builtin__' on py2 and 'builtins' on py3 because it wants to call .open(), an alias of the builtin open() function. I don't think the code should care whether "import builtins" succeeds because it runs under py3 or under py2+future, so long as "import builtins" results in locals()['builtins'] having the semantics it would have under py3. I view this as a form of duck typing. This may be an academic question, of course; the important thing is that the patch is committed so trunk now works with and without future installed. Cheers, Daniel