
I've been watching the development of pypy with great interest. Over all the pyhton projects I contribute to, there are many modules that already work fine with pypy, with a few that don't. Lxml is our favourite library for XML handling, and we mostly gave up on etree compatibility some time ago to benefit from the best APIs in lxml. So I'm curious to know if there are any plans to support lxml in pypy or any other ideas in this area that might be of interest. I don't have a burning need to run my software right now with pypy, but I'm interested in the possibility, as it seems quite mature and useful already. Friedel -- Recently on my blog: http://translate.org.za/blogs/friedel/en/content/virtaal-070-released

I know I'd be interested in a ctypes port. If there were a ctypes port, it would work in pypy, jython, and IronPython in addition to CPython. It would also simplify the build process (removing the need for a compiler if the backing libs are available). This would be a substantial effort, though, and would probably require its own maintainer, at least until it gained sufficient usage to justify merging it into the mainline effort. I don't know if there's anyone seriously considering a ctypes port, and I know I wouldn't be the person to lead it, but I'd be willing to contribute. I've done a ctypes port of python-mysql, videocapture for Windows, and parts of the Windows API (as part of jaraco.windows). Has anyone considered a ctypes port before? Is it known to be viable or not?

On 06/26/2011 09:42 AM, Stefan Behnel wrote:
Very, very cool! Using Cython does open up different backend possibilities. I was very happily surprised that Python 3 was supported due to Cython, and now there's at least hope to make it work with PyPy. Porting lxml directly to ctypes (as Jason suggested elsewhere in this thread) would be a huge job. There many subtle memory management issues in lxml that would need to be tackled very exactly all over again. Regards, Martijn

Martijn Faassen, 16.07.2011 13:44:
The Cython port actually goes through ctypes, for which PyPy appears to have efficient support. Note that it's not a goal of the port to make something like lxml portable, the only goal is to port Cython as an extension language for PyPy. I should state clearly here that this is only a part of the necessary work to port lxml to PyPy. At the current state of affairs, it's not even clear how complete the Cython port will be at the end of the GSoC, and if that's enough to start porting lxml. Even if it is, it's completely open how much needs to be done on the side of lxml, except that I already know that there *are* things to be done. And even if everything turns out to be doable, there's still the fact that someone actually has to do it. So don't expect a port any time soon. Stefan

I know I'd be interested in a ctypes port. If there were a ctypes port, it would work in pypy, jython, and IronPython in addition to CPython. It would also simplify the build process (removing the need for a compiler if the backing libs are available). This would be a substantial effort, though, and would probably require its own maintainer, at least until it gained sufficient usage to justify merging it into the mainline effort. I don't know if there's anyone seriously considering a ctypes port, and I know I wouldn't be the person to lead it, but I'd be willing to contribute. I've done a ctypes port of python-mysql, videocapture for Windows, and parts of the Windows API (as part of jaraco.windows). Has anyone considered a ctypes port before? Is it known to be viable or not?

On 06/26/2011 09:42 AM, Stefan Behnel wrote:
Very, very cool! Using Cython does open up different backend possibilities. I was very happily surprised that Python 3 was supported due to Cython, and now there's at least hope to make it work with PyPy. Porting lxml directly to ctypes (as Jason suggested elsewhere in this thread) would be a huge job. There many subtle memory management issues in lxml that would need to be tackled very exactly all over again. Regards, Martijn

Martijn Faassen, 16.07.2011 13:44:
The Cython port actually goes through ctypes, for which PyPy appears to have efficient support. Note that it's not a goal of the port to make something like lxml portable, the only goal is to port Cython as an extension language for PyPy. I should state clearly here that this is only a part of the necessary work to port lxml to PyPy. At the current state of affairs, it's not even clear how complete the Cython port will be at the end of the GSoC, and if that's enough to start porting lxml. Even if it is, it's completely open how much needs to be done on the side of lxml, except that I already know that there *are* things to be done. And even if everything turns out to be doable, there's still the fact that someone actually has to do it. So don't expect a port any time soon. Stefan
participants (4)
-
F Wolff
-
Jason R. Coombs
-
Martijn Faassen
-
Stefan Behnel