If we decide to port zope.org-based projects to Python 3, please please please, port them to Python 2&3 rather than relying on 2to3 (or 3to2). That is, update the code to work with both Python 2 and Python 3. Relying on 2to3 (or 3to2) is a headache for anyone who uses a "develop" installation of a package. (It's also rather annoying for someone installing a 2to3-based project in Python 3.)
I often use develop installs of packages when debugging interactions among packages and it's not practical to use 2to3 in that situation, especially if there's a chance you'll need to make changes and check them in.
I found 2to3 somewhat helpful in beginning the process of getting buildout working with Python 3, but then worked the source into a form that works with both Python versions. The code is uglier, but not as ugly as incporating 2to3 in the development workflow.
The six module:
http://pypi.python.org/pypi/six
should help a lot. I didn't use it in buildout, because I didn't want to add a dependency. I did reuse some ideas.
Oh, BTW, for those who haven't noticed, buildout ios now available for Python 3:
http://pypi.python.org/pypi/zc.buildout/2.0.0a1
which means there's one less excuse not to start thinking about Python 3 ports. :)
Jim
-- Jim Fulton http://www.linkedin.com/in/jimfulton
Hello,
On Sat, 30 Apr 2011 11:36:33 -0400 you wrote:
Oh, BTW, for those who haven't noticed, buildout ios now available for Python 3:
http://pypi.python.org/pypi/zc.buildout/2.0.0a1
which means there's one less excuse not to start thinking about Python 3 ports. :)
Sounds great. Do we want buildbots (in windows) for that?
On Mon, May 2, 2011 at 3:02 AM, Adam GROSZER agroszer.ll@gmail.com wrote:
Hello,
On Sat, 30 Apr 2011 11:36:33 -0400 you wrote:
Oh, BTW, for those who haven't noticed, buildout ios now available for Python 3:
http://pypi.python.org/pypi/zc.buildout/2.0.0a1
which means there's one less excuse not to start thinking about Python 3 ports. :)
Sounds great. Do we want buildbots (in windows) for that?
For what?
Jim
Hello,
On Mon, 2 May 2011 06:55:34 -0400 you wrote:
On Mon, May 2, 2011 at 3:02 AM, Adam GROSZERagroszer.ll@gmail.com wrote:
Hello,
On Sat, 30 Apr 2011 11:36:33 -0400 you wrote:
Oh, BTW, for those who haven't noticed, buildout ios now available for Python 3:
http://pypi.python.org/pypi/zc.buildout/2.0.0a1
which means there's one less excuse not to start thinking about Python 3 ports. :)
Sounds great. Do we want buildbots (in windows) for that?
For what?
For zc.buildout 2.0.0 on windows with Python 3(.2?)
On Mon, May 2, 2011 at 8:22 AM, Adam GROSZER agroszer.ll@gmail.com wrote:
Hello,
On Mon, 2 May 2011 06:55:34 -0400 you wrote:
On Mon, May 2, 2011 at 3:02 AM, Adam GROSZERagroszer.ll@gmail.com wrote:
Hello,
On Sat, 30 Apr 2011 11:36:33 -0400 you wrote:
Oh, BTW, for those who haven't noticed, buildout ios now available for Python 3:
http://pypi.python.org/pypi/zc.buildout/2.0.0a1
which means there's one less excuse not to start thinking about Python 3 ports. :)
Sounds great. Do we want buildbots (in windows) for that?
For what?
For zc.buildout 2.0.0 on windows with Python 3(.2?)
OK. We're not ready for this yet. There are some test failures that are either spurious or inconsequential.
Jim
On Sat, Apr 30, 2011 at 17:36, Jim Fulton jim@zope.com wrote:
If we decide to port zope.org-based projects to Python 3, please please please, port them to Python 2&3 rather than relying on 2to3 (or 3to2). That is, update the code to work with both Python 2 and Python 3. Relying on 2to3 (or 3to2) is a headache for anyone who uses a "develop" installation of a package. (It's also rather annoying for someone installing a 2to3-based project in Python 3.)
I'm not sure exactly what "using a develop installation means" or what headaches it causes, but, for many projects supporting Python 2 and Python 3 without 2to3 is going to require massive changes and/or dropping Python 2.5 support. That has to be considered.
I found 2to3 somewhat helpful in beginning the process of getting buildout working with Python 3, but then worked the source into a form that works with both Python versions. The code is uglier, but not as ugly as incporating 2to3 in the development workflow.
Well, incorporating 2to3 into the buildout development workflow would have been nearly impossible, but buildout is a special case.
//Lennart
On Wed, May 4, 2011 at 3:01 AM, Lennart Regebro regebro@gmail.com wrote:
On Sat, Apr 30, 2011 at 17:36, Jim Fulton jim@zope.com wrote:
If we decide to port zope.org-based projects to Python 3, please please please, port them to Python 2&3 rather than relying on 2to3 (or 3to2). That is, update the code to work with both Python 2 and Python 3. Relying on 2to3 (or 3to2) is a headache for anyone who uses a "develop" installation of a package. (It's also rather annoying for someone installing a 2to3-based project in Python 3.)
I'm not sure exactly what "using a develop installation means" or what headaches it causes,
Often, when working on a project, I'll check it out and create a develop egg that allows me to work with it in place. It's not practical to run 2to3 on it. This is especially true if I'm working on it while I'm working on something else.
but, for many projects supporting Python 2 and Python 3 without 2to3 is going to require massive changes and/or dropping Python 2.5 support. That has to be considered.
Right, Python 3 is a giant pain. 2to3 is far from perfect, so significant changes are often needed even if you use 2to3. I believe that the workflow impacts of 2to3 are far worse than the, admittedly painful, impacts of maintaining code that runs in Python 2.5-2.7 and 3.2. Buildout works with all these versions and it's been fairly straightforward to make it do so.
I found 2to3 somewhat helpful in beginning the process of getting buildout working with Python 3, but then worked the source into a form that works with both Python versions. The code is uglier, but not as ugly as incporating 2to3 in the development workflow.
Well, incorporating 2to3 into the buildout development workflow would have been nearly impossible, but buildout is a special case.
AFAICT, 2to3 really just doesn't play with develop eggs. That was the buildout issue. It wasn't unique to buildout. I'm sure I'm not the only one who uses develop eggs.
Jim
-- Jim Fulton http://www.linkedin.com/in/jimfulton
On 05/05/2011 07:41 PM, Jim Fulton wrote:
On Wed, May 4, 2011 at 3:01 AM, Lennart Regebroregebro@gmail.com wrote:
On Sat, Apr 30, 2011 at 17:36, Jim Fultonjim@zope.com wrote:
If we decide to port zope.org-based projects to Python 3, please please please, port them to Python 2&3 rather than relying on 2to3 (or 3to2). That is, update the code to work with both Python 2 and Python 3. Relying on 2to3 (or 3to2) is a headache for anyone who uses a "develop" installation of a package. (It's also rather annoying for someone installing a 2to3-based project in Python 3.)
I'm not sure exactly what "using a develop installation means" or what headaches it causes,
Often, when working on a project, I'll check it out and create a develop egg that allows me to work with it in place. It's not practical to run 2to3 on it. This is especially true if I'm working on it while I'm working on something else.
but, for many projects supporting Python 2 and Python 3 without 2to3 is going to require massive changes and/or dropping Python 2.5 support. That has to be considered.
Right, Python 3 is a giant pain. 2to3 is far from perfect, so significant changes are often needed even if you use 2to3. I believe that the workflow impacts of 2to3 are far worse than the, admittedly painful, impacts of maintaining code that runs in Python 2.5-2.7 and 3.2. Buildout works with all these versions and it's been fairly straightforward to make it do so.
Note: while Thomas and I worked on the Python 3 port of zc.buildout at the last Sprint we didn't even find it overly challenging to also keep Python 2.4 in the loop.
Christian