Re: [Python-Dev] 2to3 porting HOWTO: setup.py question

2012-07-24 Thread Michael Foord
On 24 Jul 2012, at 11:52, Devin Jeanpierre wrote: > On Tue, Jul 24, 2012 at 6:07 AM, Michael Foord > wrote: >>> This is not an ideal world and 2to3 is not good enough to convert files >>> without further intervention and testing. >> >> It is if you design your code *to be converted* by 2to3 an

Re: [Python-Dev] 2to3 porting HOWTO: setup.py question

2012-07-24 Thread Devin Jeanpierre
On Tue, Jul 24, 2012 at 6:07 AM, Michael Foord wrote: >> This is not an ideal world and 2to3 is not good enough to convert files >> without further intervention and testing. > > It is if you design your code *to be converted* by 2to3 and do regular > testing of the result. That's hardly without

Re: [Python-Dev] 2to3 porting HOWTO: setup.py question

2012-07-24 Thread Oscar Benjamin
On Jul 24, 2012 10:32 AM, "Terry Reedy" wrote: > > On 7/24/2012 12:44 AM, anatoly techtonik wrote: > >> Python 3 check explicitly tells the reader that 2to3 should only be >> used in Python 3. Otherwise everybody need to guess when this *_2to3 >> tools are triggered. As for me, I see no technical

Re: [Python-Dev] 2to3 porting HOWTO: setup.py question

2012-07-24 Thread Michael Foord
On 24 Jul 2012, at 10:30, Terry Reedy wrote: > On 7/24/2012 12:44 AM, anatoly techtonik wrote: > >> Python 3 check explicitly tells the reader that 2to3 should only be >> used in Python 3. Otherwise everybody need to guess when this *_2to3 >> tools are triggered. As for me, I see no technical li

Re: [Python-Dev] 2to3 porting HOWTO: setup.py question

2012-07-24 Thread Terry Reedy
On 7/24/2012 12:44 AM, anatoly techtonik wrote: Python 3 check explicitly tells the reader that 2to3 should only be used in Python 3. Otherwise everybody need to guess when this *_2to3 tools are triggered. As for me, I see no technical limitations why *_2to3 can not be run by Python 2 (PyPy, RPy

Re: [Python-Dev] 2to3 porting HOWTO: setup.py question

2012-07-23 Thread anatoly techtonik
On Tue, Jul 24, 2012 at 1:27 AM, Éric Araujo wrote: > On 22/07/2012 15:57, R. David Murray wrote: >> >> I'm not familiar with distutils, really, so you could be right about >> what it is important to test. I was commenting based on the code >> snippet presented, which just deciding which "build"

Re: [Python-Dev] 2to3 porting HOWTO: setup.py question

2012-07-23 Thread Oscar Benjamin
On 23 July 2012 23:27, Éric Araujo wrote: > On 22/07/2012 15:57, R. David Murray wrote: > >> I'm not familiar with distutils, really, so you could be right about >> what it is important to test. I was commenting based on the code >> snippet presented, which just deciding which "build" object to

Re: [Python-Dev] 2to3 porting HOWTO: setup.py question

2012-07-23 Thread Éric Araujo
On 22/07/2012 15:57, R. David Murray wrote: I'm not familiar with distutils, really, so you could be right about what it is important to test. I was commenting based on the code snippet presented, which just deciding which "build" object to use. If build_py_2to3 can be imported by python2 and su

Re: [Python-Dev] 2to3 porting HOWTO: setup.py question

2012-07-23 Thread anatoly techtonik
On Mon, Jul 23, 2012 at 12:21 AM, Oscar Benjamin wrote: >> On Sun, 22 Jul 2012 20:22:50 +0100, Oscar Benjamin >> wrote: >> > On 22 July 2012 14:08, R. David Murray wrote: >> > >> > > On Sun, 22 Jul 2012 11:21:38 +0300, anatoly techtonik >> > > >> > > wrote: >> > > > http://docs.python.org/py3k/

Re: [Python-Dev] 2to3 porting HOWTO: setup.py question

2012-07-22 Thread Oscar Benjamin
On 22 July 2012 20:57, R. David Murray wrote: > Benjamin sent me this message separately(*) privately and I responded > privately. Here is my response. > (*) or his mailer did > I think I accidentally replied from my work email address (which is not subscribed to python-dev) and so the second

Re: [Python-Dev] 2to3 porting HOWTO: setup.py question

2012-07-22 Thread R. David Murray
Benjamin sent me this message separately(*) privately and I responded privately. Here is my response. (*) or his mailer did On Sun, 22 Jul 2012 20:22:50 +0100, Oscar Benjamin wrote: > On 22 July 2012 14:08, R. David Murray wrote: > > > On Sun, 22 Jul 2012 11:21:38 +0300, anatoly techtonik > >

[Python-Dev] 2to3 porting HOWTO: setup.py question

2012-07-22 Thread Oscar Benjamin
On 22 July 2012 14:08, R. David Murray wrote: > On Sun, 22 Jul 2012 11:21:38 +0300, anatoly techtonik > wrote: > > http://docs.python.org/py3k/howto/pyporting.html#during-installation > > > > What's the point in making implicit Python 3 check here: > > try: # Python 3 > > from distutils.comma

Re: [Python-Dev] 2to3 porting HOWTO: setup.py question

2012-07-22 Thread R. David Murray
On Sun, 22 Jul 2012 11:21:38 +0300, anatoly techtonik wrote: > http://docs.python.org/py3k/howto/pyporting.html#during-installation > > What's the point in making implicit Python 3 check here: > try: # Python 3 > from distutils.command.build_py import build_py_2to3 as build_py > except Import

[Python-Dev] 2to3 porting HOWTO: setup.py question

2012-07-22 Thread anatoly techtonik
http://docs.python.org/py3k/howto/pyporting.html#during-installation What's the point in making implicit Python 3 check here: try: # Python 3 from distutils.command.build_py import build_py_2to3 as build_py except ImportError: # Python 2 from distutils.command.build_py import build_py inste