[lxml-dev] first lessons learned while porting lxml to Py3
Stefan Behnel
stefan_ml at behnel.de
Fri May 30 17:24:31 CEST 2008
Hi,
Martijn Faassen wrote:
> I'm glad to hear that you'll try being more clear with how unicode works
> for the Python 2.x version of lxml too. I think this is similar to the
> way the migration path enables this for plain Python code in Python 2.6.
There will be little changes when running in Py2. It will still accept byte
strings at the API level and return them for plain ASCII values. This only
changes under Py3, where you will always get a unicode string back for .tag,
.text, etc.
I'm not even planning to block passing byte strings as tag name, although that
will become really rare for Python code running in Py3.
> I do hope that lxml for Python 2.x can be maintained and extended for
> the forseeable future though; I'm sitting on a vast mountain of
> codebases that aren't going to Python 3.x in a hurry.
There will only be a single code base. We ported the code that Cython
generates in a way that makes it compile from Py2.3 to Py3.0 without changes,
and I'm planning to continue the support for 2.3 as long as possible.
We are plannung a new release of Cython shortly after the release of 3.0/2.6
beta1.
Stefan
More information about the lxml-dev
mailing list