Proposal: from __future__ import unicode_string_literals

Maybe it's not apparent to people that hasn't developed in that kind of environment, and I'm sorry I'm not able to make this clearer.
I think I understand the issue.
Some contributors will be running under 2.6, others will be running under 3.0.
Either the code forks, or one of them is working with (and developing patches against) the result of a compilation step, instead of against the original source code.
For example, if I'm using the (real source) py2.6 code, and I create a patch that works for me, it is ready for testing and submission. If I'm using the (generated) py3 code, then I first have to get a copy of the (source) 2.6, figure out how I *would* have written it there, then keep tweaking it so that the generator eventually puts out ... what I had originally written by hand.
My (working in 3.0) task would be easier if there is also a 3to2 (so that I can treat my own code as the source), but then entire files will do flip-flops on a regular basis (depening on which version was generated), unless 2to3 and 3to2 somehow create a perfect round-trip.
And that compile step -- it can be automated, but I suspect most python projects don't yet have a good place to put the hooks, simply because they haven't needed to in the past.
The end result is that the barrier to contributions becomes much higher for people working in at least one of the versions.
-jJ

For example, if I'm using the (real source) py2.6 code, and I create a patch that works for me, it is ready for testing and submission. If I'm using the (generated) py3 code, then I first have to get a copy of the (source) 2.6, figure out how I *would* have written it there, then keep tweaking it so that the generator eventually puts out ... what I had originally written by hand.
Yes, that's tedious. In that case, it is easier to edit the original source, and then rerun 2to3, rather than editing the compiler output.
Regards, Martin

Martin v. Löwis wrote:
For example, if I'm using the (real source) py2.6 code, and I create a patch that works for me, it is ready for testing and submission. If I'm using the (generated) py3 code, then I first have to get a copy of the (source) 2.6, figure out how I *would* have written it there, then keep tweaking it so that the generator eventually puts out ... what I had originally written by hand.
Yes, that's tedious. In that case, it is easier to edit the original source, and then rerun 2to3, rather than editing the compiler output.
This technique has actually been the one recommended by Guido for migration for at least a year now. Clearly you can't have developers tweaking source on both sides of the "great divide", as one may have to re-cast bits of one's 2.6 code in order to get a satisfactory translation into 3.0.
Once you start editing 3.0 source you have to either leave the 2.X world behind or accept a dual-source development.
regards Steve
participants (3)
-
"Martin v. Löwis"
-
Jim Jewett
-
Steve Holden