Open npiganeau opened 9 years ago
I believe these bindings are outdated and cannot be used with today's PyPy. After much fiddling with the sources I was able to build it on OSX 10.9.5 (Maverics) / macports + PyPy 2.6. However it was super unstable, spat out RuntimeError when querying an elem for its children (in random places). Totally unusable IMO. So I deleted it all together.
The error messages seem to indicate a different version of libxml, PyPy's version is not relevant here. Can you check which version of libxml you are using?
2.9.2
@amauryfa Actually it is the same version of libxml in both docker instances: 2.9.1.
root@6689ce5271c5:/# pypy --version
Python 2.7.9 (9c4588d731b7, Mar 23 2015, 16:30:30)
[PyPy 2.5.1 with GCC 4.6.3]
root@6689ce5271c5:/# ldconfig -v|grep xml
libxml2.so.2 -> libxml2.so.2.9.1
root@3b5593dee3af:/# pypy --version
Python 2.7.9 (295ee98b6928, May 31 2015, 07:29:04)
[PyPy 2.6.0 with GCC 4.8.2]
root@3b5593dee3af:/# ldconfig -v |grep xml
libxml2.so.2 -> libxml2.so.2.9.1
Then perhaps it's an OSX thing
And while we're at it, in my tests I noticed it took the cffi+pypy lxml ~3-5 times more time than cpython lxml to parse the same HTML page. I wasn't expecting that at all, thought cffi would be faster. Have you seen anything like it?
2015-06-21 22:41 GMT+02:00 Aleksandr Glyzov notifications@github.com:
And while we're at it, in my tests I noticed it took the cffi+pypy lxml ~3-5 times more time than cpython lxml to parse the same HTML page. I wasn't expecting that at all, thought cffi would be faster. Have you seen anything like it?
I remember doing some benchmarks, and the results were in the same range as CPython (some were 40% faster, others 40% slower...) But it's very possible that some paths are still much slower.
Also, be sure to warm up pypy's JIT by running 1000 loops of your function before doing any timings.
Amaury Forgeot d'Arc
+1 on this error. What is the suggested solution here?
+1. same error here on debian without any docker. Any solutions?
@nichochar and @aldarund guys, try this fork: https://github.com/aglyzov/lxml.git I have added explicit libxml/relaxng.h includes everywhere and it started to build ok.
Building on PyPy 2.6 (with cffi 1.1) breaks with ValidationError whereas it works perfectly on PyPy 2.5. Tests were made with official PyPy docker images (tags '2-2.6' vs '2-2.5').
PyPy 2.6:
PyPy 2.5