Re: [Zope-dev] Zope vs. Python 3 porting roadmap

2010-11-24 Thread Lennart Regebro
Oh, and zc.buildout also exposes bugs in Distribute under Python 3, so
a new version of Distribute is needed before this can be finished. But
that could probably happen quite fast after I get most of the
zc.buildout tests running.
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Zope vs. Python 3 porting roadmap

2010-11-24 Thread Lennart Regebro
On Tue, Nov 23, 2010 at 22:21, Jim Fulton  wrote:
> This is like saying it needed to support Python 2 before it could be
> written on Python 2.

With the difference that it's written bit by bit, but needs to get
ported all at once. Of course, if you know which tests to get to pass
first it's easier. I'm getting there, I for example realized that the
bootstrap tests probably should be made to pass last, not first. :-)

>> That too is a horrid nightmare, since zc.buildout also tend to
>> generate code from strings,
>
> The code it generates is pretty simple, but if it can't generate
> 2&3-compatible code, then not worrying about 2to3 should make
> generating code simpler.

Because the code it generates are in strings, 2to3 won't touch it, so
it has to be changed by hand to run on both 2 and 3. As you say, the
code is simple which means it's usually a simple task to make it
compatible.

>> and then makes things even more fun by
>> having tests that require there to be at least three different
>> versions released on PyPI. :-)
>
> The upgrade tests?  The bootstrap tests?  I would disable these to get 
> started.

Yeah, it's a part of the bootstrap tests. I probably have to disable
them, yeah. Possibly I could get them to use a local fake PyPI with
several "fake" zc.buildout versions. We'll see, that's quite far away
yet.

--
Lennart Regebro, Colliberty: http://www.colliberty.com/
Telephone: +48 691 268 328
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Zope vs. Python 3 porting roadmap

2010-11-23 Thread Jim Fulton
On Tue, Nov 23, 2010 at 4:09 PM, Lennart Regebro  wrote:
> High hanging fruit:
> ===
> zc.buildout: (depends on itself, hard to use 2to3)
>    setuptools - Done
>    zope.testing - [test] Done, not released
> COMMENT: Since zc.buildout uses itself to install and run and test, it needs 
> to
> support Python 3 before you can start porting it to Python 3. Tricky. :-)

This is like saying it needed to support Python 2 before it could be
written on Python 2.

> Using 2to3 get's complicated, so I'm trying to port this to Python 2 without
> it.

I assume you mean Python 3.  I think this (not trying to use 2to3) is
the right approach.

> That too is a horrid nightmare, since zc.buildout also tend to
> generate code from strings,

The code it generates is pretty simple, but if it can't generate
2&3-compatible code, then not worrying about 2to3 should make
generating code simpler.

> and then makes things even more fun by
> having tests that require there to be at least three different
> versions released on PyPI. :-)

The upgrade tests?  The bootstrap tests?  I would disable these to get started.

Jim

-- 
Jim Fulton
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )