Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-16 Thread Stephen J. Turnbull
Nick Coghlan writes: > - even if there is a test suite, sufficiently pervasive [str/bytes] > type ambiguity may make it difficult to use for fault isolation Difficult yes, but I would argue that that difficuly is inherent[1]. Ie, if it's pervasive, the fault should be isolated to the whole

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-15 Thread Nick Coghlan
On 10 June 2016 at 16:36, Neil Schemenauer wrote: > Nick Coghlan wrote: >> It could be very interesting to add an "ascii-warn" codec to Python >> 2.7, and then set that as the default encoding when the -3 flag is >> set. > > I don't think that can work. The

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-10 Thread Neil Schemenauer
Nick Coghlan wrote: > It could be very interesting to add an "ascii-warn" codec to Python > 2.7, and then set that as the default encoding when the -3 flag is > set. I don't think that can work. The library code in Python would spew out warnings even in the cases when

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-10 Thread Nick Coghlan
On 10 June 2016 at 11:00, Neil Schemenauer wrote: > On 6/10/2016 10:49 AM, Nick Coghlan wrote: >> More -3 warnings in Python 2.7 are definitely welcome (since those can >> pick up runtime behaviors that the static analysers miss), and if >> there are things the existing code

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-10 Thread Neil Schemenauer
On 6/10/2016 10:49 AM, Nick Coghlan wrote: What Brett said is mostly accurate for me, except with one slight caveat: I've been explicitly trying to nudge you towards making the *existing tools better*, rather than introducing new tools. With modernize and futurize we have a fairly clear

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-10 Thread Nick Coghlan
On 10 June 2016 at 07:09, Cody Piersall wrote: >> One problem is that the str literals should be bytes >> literals. Comparison with None needs to be avoided. >> >> With Python 2 code runs successfully. With Python 3 the code >> crashes with a traceback. With my

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-10 Thread Nick Coghlan
On 9 June 2016 at 16:43, Brett Cannon wrote: > That's not what I'm saying at all (nor what I think Nick is saying); more > tooling to ease the transition is always welcomed. What Brett said is mostly accurate for me, except with one slight caveat: I've been explicitly trying to

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-10 Thread Brett Cannon
On Thu, 9 Jun 2016 at 19:53 Mark Lawrence via Python-Dev < python-dev@python.org> wrote: > On 10/06/2016 00:43, Brett Cannon wrote: > > > > That's not what I'm saying at all (nor what I think Nick is saying); > > more tooling to ease the transition is always welcomed. The point we are > > trying

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-10 Thread Paul Moore
On 10 June 2016 at 15:09, Cody Piersall wrote: >> One problem is that the str literals should be bytes >> literals. Comparison with None needs to be avoided. >> >> With Python 2 code runs successfully. With Python 3 the code >> crashes with a traceback. With my

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-10 Thread Cody Piersall
> One problem is that the str literals should be bytes > literals. Comparison with None needs to be avoided. > > With Python 2 code runs successfully. With Python 3 the code > crashes with a traceback. With my modified Python 3.6, the code > runs successfully but generates the following

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-10 Thread Paul Moore
On 10 June 2016 at 03:13, Barry Warsaw wrote: > In my own experience, and IIRC Amber had a similar experience, the ease of > porting to Python 3 really comes down to how bytes/unicode clean your code > base is. Almost all the other pieces are either pretty manageable or fairly

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-10 Thread Stephen J. Turnbull
Neil Schemenauer writes: > I have to wonder if you guys actually ported at lot of Python 2 > code. Python 3 (including stdlib) itself is quite a bit of code. > According to you guys, there is no problem No, according to us, there are problems, but in the code, not in the language or its

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-09 Thread Barry Warsaw
On Jun 09, 2016, at 05:35 PM, Neil Schemenauer wrote: >Amber Brown claimed that she spent $60k of her time porting Twisted to Python >3. I think there is lots of room to make our porting tools better. Amber gave a presentation at the language summit and a Pycon talk. The latter video is up on

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-09 Thread Neil Schemenauer
On 2016-06-09, Brett Cannon wrote: > I don't think you meant for what you said to sound insulting, > Neil, but it did feel like it upon first reading. Sorry, I think I misunderstood what you and Nick were saying. I've experienced a fair amount of negative feedback on my idea so I'm pretty cranky

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-09 Thread Brett Cannon
On Thu, 9 Jun 2016 at 16:08 Neil Schemenauer wrote: > On 2016-06-09, Brett Cannon wrote: > > On Thu, 9 Jun 2016 at 14:56 Nick Coghlan wrote: > > > Once you switch to those now recommended more conservative migration > > > tools, the tool suite you request

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-09 Thread Neil Schemenauer
On 2016-06-09, Brett Cannon wrote: > On Thu, 9 Jun 2016 at 14:56 Nick Coghlan wrote: > > Once you switch to those now recommended more conservative migration > > tools, the tool suite you request already exists: > > > > - update your code with modernize or futurize > > - check

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-09 Thread Fred Drake
On Thu, Jun 9, 2016 at 6:16 PM, Ethan Furman wrote: > That's awfully close to antipathy [1], my path module on PyPI. Good point. Increasing confusion would not help. > Besides, I liked the suggestion from the -ideas list: Python 2therescue. ;) Nice; I like that too. :-)

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-09 Thread Ethan Furman
On 06/08/2016 02:40 PM, Fred Drake wrote: On Wed, Jun 8, 2016 at 5:33 PM, Ryan Gonzalez wrote: What about something like "unpythonic" or similar? Or perhaps... antipythy? That's awfully close to antipathy [1], my path module on PyPI. Besides, I liked the suggestion from

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-09 Thread Brett Cannon
On Thu, 9 Jun 2016 at 14:56 Nick Coghlan wrote: > On 8 June 2016 at 14:01, Neil Schemenauer wrote: > > [I've posted something about this on python-ideas but since I now > > have some basic working code, I think it is more than an idea.] > > > > I think the

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-09 Thread Nick Coghlan
On 8 June 2016 at 14:01, Neil Schemenauer wrote: > [I've posted something about this on python-ideas but since I now > have some basic working code, I think it is more than an idea.] > > I think the uptake of Python 3 is starting to accelerate. That's > good. However, there are

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-08 Thread Guido van Rossum
Or write your own set of 2to3 fixers that *are* necessary. On Wed, Jun 8, 2016 at 6:11 PM, Victor Stinner wrote: > 2016-06-08 23:01 GMT+02:00 Neil Schemenauer : > > - code coming out of 2to3 runs correctly on this modified Python > > Stop using 2to3.

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-08 Thread Victor Stinner
2016-06-08 23:01 GMT+02:00 Neil Schemenauer : > - code coming out of 2to3 runs correctly on this modified Python Stop using 2to3. This tool adds many useless changes when you only care of Python 2.7 and Python 3.4+. I suggest to use better tools like 2to6, modernize or my own

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-08 Thread Oleg Broytman
On Thu, Jun 09, 2016 at 10:08:50AM +1200, Greg Ewing wrote: > >On Jun 8, 2016 4:04 PM, "Neil Schemenauer" >> wrote: > > > > > > I've temporarily named it "Pragmatic Python". I'd like a better > > > name if someone can suggest

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-08 Thread Greg Ewing
On Jun 8, 2016 4:04 PM, "Neil Schemenauer" > wrote: > > I've temporarily named it "Pragmatic Python". I'd like a better > name if someone can suggest one. Maybe something like Perverted, > Debauched or Impure Python. Python Two and Three Quarters.

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-08 Thread Fred Drake
On Wed, Jun 8, 2016 at 5:33 PM, Ryan Gonzalez wrote: > What about something like "unpythonic" or similar? Or perhaps... antipythy? -Fred -- Fred L. Drake, Jr. "A storm broke loose in my mind." --Albert Einstein ___

Re: [Python-Dev] Smoothing the transition from Python 2 to 3

2016-06-08 Thread Ryan Gonzalez
On Jun 8, 2016 4:04 PM, "Neil Schemenauer" wrote: > > [I've posted something about this on python-ideas but since I now > have some basic working code, I think it is more than an idea.] > > I think the uptake of Python 3 is starting to accelerate. That's > good. However, there