From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 30C781381F3 for ; Tue, 21 May 2013 15:34:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 84710E084F; Tue, 21 May 2013 15:34:12 +0000 (UTC) Received: from mpv1.tis.cwru.edu (mpv1.tis.cwru.edu [129.22.105.36]) (using TLSv1 with cipher DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0D5F7E084F for ; Tue, 21 May 2013 15:34:11 +0000 (UTC) Received: from mpv6.tis.CWRU.Edu (EHLO mpv6.cwru.edu) ([129.22.104.221]) by mpv1.tis.cwru.edu (MOS 4.3.5-GA FastPath queued) with ESMTP id AMV02031; Tue, 21 May 2013 11:34:11 -0400 (EDT) Received: from mail-qa0-f53.google.com (EHLO mail-qa0-f53.google.com) ([209.85.216.53]) by mpv6.cwru.edu (MOS 4.3.3-GA FastPath queued) with ESMTP id BQK45580; Tue, 21 May 2013 11:34:11 -0400 (EDT) Received: by mail-qa0-f53.google.com with SMTP id bs12so459496qab.5 for ; Tue, 21 May 2013 08:34:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=rsJ6qAgv1YMOEn8AXUEDO7IsUDG1EL3NgmDGiaNvfpU=; b=Ft4Uw2Kq4cdxffu4I4c5LCRWjjCulIcN5iOctFAHweiv4kDllmQzS62T2xFMb+4TE/ qRyjtKbkwLKAjyyLDhm6JjNtvH9lL+chkeDNQXMDYhD67nCjmOC3E/ozCVPrr/rPrwJ3 B480lzjbV88V46RVugFRGMx4bhUSDHl8nR5cPDoRHY23fLH3edMI27eBO5mWrh2PzrDH HUCtytdyaR5AvoflMJsw0FyamcCMW5KCc82wmcmTBxgByxQatIdnxBSvZ3RuwZTlgcl5 ccDlAIM0Xt4CEpSrEemljiuY4qBGNJovJnsXFzBdi2iVppXpRSvkuZ+NfESv5qzIpN4U 237A== X-Received: by 10.229.147.197 with SMTP id m5mr1078885qcv.48.1369150447184; Tue, 21 May 2013 08:34:07 -0700 (PDT) X-Received: by 10.229.147.197 with SMTP id m5mr1078884qcv.48.1369150447119; Tue, 21 May 2013 08:34:07 -0700 (PDT) Received: from [129.22.151.147] (giygas.STUDENT.CWRU.Edu. [129.22.151.147]) by mx.google.com with ESMTPSA id j5sm3519384qan.7.2013.05.21.08.34.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 May 2013 08:34:06 -0700 (PDT) Message-ID: <519B93EE.8080707@case.edu> Date: Tue, 21 May 2013 11:34:06 -0400 From: Matthew Ruffalo User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org MIME-Version: 1.0 To: gentoo-catalyst@lists.gentoo.org Subject: Re: [gentoo-catalyst] Python 3 support References: <519A9044.2050104@case.edu> <1369089959.30989.22.camel@big_daddy.dol-sen.ca> <1369146785.30989.34.camel@big_daddy.dol-sen.ca> In-Reply-To: <1369146785.30989.34.camel@big_daddy.dol-sen.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQlFDgK1BIvRrQPlww85E7i2522AB2DE8wehiQU+iuVfQvyRBGNcgZdCmsMVknjieYsXOGgkHkAn05AE5/QAfuQkh9R+xtNqAie9wg9bI2FTsWMQSeR+IEtwlpZ0Qc8hHabOUWzkXQYTB1WgLPodL5+vap0Ptm+jKW+oU2dDbu6bJKYV4gQ= X-Junkmail-Whitelist: YES (by domain whitelist at mpv1.tis.cwru.edu) X-Archives-Salt: 734a8510-5233-4682-a8a2-39e74bc466f1 X-Archives-Hash: ca3cb69b2f07eb3ef32383c5ac3bc93c On 05/21/2013 10:33 AM, Brian Dolbec wrote: > On Tue, 2013-05-21 at 12:33 +0200, Dmitry Selyutin wrote: >> Hello everyone! >> >> Since I'm going to reimplement catalyst in GSoC, I'd like to tell my >> opinion if it has some weight. :-) >> Some years have passed since Python 3 was created, and nowadays I >> think it is stable enough to select it. I'd rather thought about >> Python 2 compatibility than Python 3, since it seems to become a >> standart soon. To cut a long story short, I'd rather oriented to >> Python 3 than Python 2, though I prefer to use Python 2 nowadays. Of >> course compatibility will be one of main aims, but I see some benefit >> if we will choose Python 3 rather than Python 2, though users may >> successfully use catalyst with Python 2 in the future. It's just a >> proposal, so I'd like to hear your opinions. If you don't agree, we >> may rather think about Python 2. > Dmitry, It's not that I don't want it to be python3 compatible as an > afterthought. For the same reason as i told you already. Catalyst is a > python2 application and is working code. It is better to fix all the > poor areas of the code first before migrating to python3. Also, that > will fix some of the compatibility issues on it's own. That way the > changes can be properly tested. Changing the code to py3 will bring > enough bugs into the system on it's own. It is far better to fix the > poor code first. > >> Even more, I'd like to avoid some generators and provide this support >> manually: I've always hated generators, especially code generators >> (and GUI ones). >> >> What do you think about it? > Catalyst should not need to have 2to3 run on it's codebase in the ebuild > to be py3 compatible. python2.6 and up are mostly py3 compatible > already. Catalyst does not do anything wild that should need porting > between versions. There are also a few tricks that can be done to > simplify compatibility without the need for conversion runs. Thank you all for the advice and feedback. Things like "don't base any real work on the master branch at git://git.overlays.gentoo.org/proj/catalyst.git" are exactly what I was hoping to hear. Some other thoughts: I wouldn't call what I'm proposing to do "refactoring". I've _used_ catalyst for quite a while but only looked at its code a few days ago. The extent of my changes would be "make it run on Python 3 and update some parts of the code to use newer/cleaner Python idioms". Almost all of the bugs introduced in 2to3 conversion will be bytes/str related, and it's easy enough to decode() text that is read from a subprocess. Everything should be valid UTF-8, so there won't be any unpleasant character encoding issues. It's likely that I'm wrong about this, but I don't think that there is much (any?) benefit to supporting Python 2 and Python 3 with the same code base. I have added 2to3 conversion to a few setup.py files, but these were in Python packages that still had to support Python 2 on multiple distributions. Catalyst is fundamentally a Gentoo _application_, and the implementation details don't really matter as long as it runs on current Gentoo systems. From my own experience as a user, I run the catalyst executable and I don't particularly care whether it's implemented in C, Java, Haskell, Python, INTERCAL, etc. I only care that I can 'emerge catalyst', make some tweaks to its files in /etc, and run 'catalyst'. Since Python 3.2+ is available on all current Gentoo systems and will be from now on, I don't think there's anything to lose by doing a one-shot conversion and changing relevant hashbang lines to "#!/usr/bin/env python3". (Brian: you may want to change http://dev.gentoo.org/~dolsen/catalyst/HEAD to contain "ref: refs/heads/rewrite" :) ) Thanks, MMR...