support for python 3.x

32 views
Skip to first unread message

Yves Dorfsman

unread,
Jun 10, 2012, 1:30:26 AM6/10/12
to pg8...@googlegroups.com

Is pg8000 supposed to support python 3.x?

When I try to run setup with python 3.2, I get a SyntaxError.

Thanks.

--
Yves. http://www.SollerS.ca/
http://ipv6.SollerS.ca
http://blog.zioup.org/

Mariano Reingart

unread,
Jun 11, 2012, 12:35:11 PM6/11/12
to pg8...@googlegroups.com
There were a branch for py3k, but it is not longer maintained IIRC.
I think using 2to3 and six library is a better approach to automate
py3k support, sadly I didn' have time for that.
It should be relatively easy to port, if you want to try it, I can help you.

Best regards,

Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com

Yves Dorfsman

unread,
Jun 11, 2012, 1:09:06 PM6/11/12
to pg8...@googlegroups.com
On 2012-06-11 10:35, Mariano Reingart wrote:
> There were a branch for py3k, but it is not longer maintained IIRC.
> I think using 2to3 and six library is a better approach to automate
> py3k support, sadly I didn' have time for that.
> It should be relatively easy to port, if you want to try it, I can help you.
>

I don't mind giving it a try.

What about a dual version approach like bottle.py (and others), where the code
is written in such a way that it can be run in both 2.x and 3.x?

I'm ok with either approach, I like the idea of not using code transformation
tool, but on the other hand, it makes it harder to get rid of all the special
case for 2.x when you decide to no longer support 2.x.

Mariano Reingart

unread,
Jun 11, 2012, 9:24:31 PM6/11/12
to pg8...@googlegroups.com
On Mon, Jun 11, 2012 at 2:09 PM, Yves Dorfsman <yv...@zioup.com> wrote:
> On 2012-06-11 10:35, Mariano Reingart wrote:
>>
>> There were a branch for py3k, but it is not longer maintained IIRC.
>> I think using 2to3 and six library is a better approach to automate
>> py3k support, sadly I didn' have time for that.
>> It should be relatively easy to port, if you want to try it, I can help
>> you.
>>
>
> I don't mind giving it a try.

Great!

> What about a dual version approach like bottle.py (and others), where the
> code is written in such a way that it can be run in both 2.x and 3.x?

That would be even better, but I'm afraid that there might be some
syntax features not available in Python 2.5
We could switch to a py3k friendly codebase if it also works with py2.x

> I'm ok with either approach, I like the idea of not using code
> transformation tool, but on the other hand, it makes it harder to get rid of
> all the special case for 2.x when you decide to no longer support 2.x.

Yes, that's why I think the six library provides easy compatibility
between them.
Reply all
Reply to author
Forward
0 new messages