Re: Python 3 support

Christoph Zwerschke <[email protected]> Thu, 31 Jan 2013 22:23:01 +0100
Newsgroups gmane.comp.python.formencode
Message-ID <[email protected]>
Am 31.01.2013 05:11, schrieb Chris Lambacher:
> After I put out the 1.2.5 release and created a branch for 1.2.x I
> started playing around with doing a Python 3 port. I tried to do it
> semi-automatically with python-modernize with the six and
> --compat-unicode options. It didn't even close to work cleanly and I
> was trying to work out how to get the meta class to work when I ran
> out of time. I've since seen some code that works on 2 & 3 that does
> the same thing I was trying to get to work so, I was on the right
> track. I *might* have some time in Feb to pick up on this. But if
> someone else wants to take a run at it that would be good.

I've just checked in a different solution with the use_2to3 option of 
Distribute, which creates a Python 3 version at build time.

Your solution using python-modernize to create a codebase that runs on 
both versions with the help of six could be a better idea, though.

But the main difficulty we're facing is the semantics of the String and 
Unicode validators under Python 3. Should we provide Bytes and String 
validators under Python 3 instead? How can we create a documentation 
that covers both versions of the validators with the automatic tools? 
I'm wondering whether creating a separate formencode3 library for Python 
3 could make more sense?

-- Christoph

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan