[lxml-dev] lxml 2.0.1 released
Hi all, lxml 2.0.1 is out, changelog follows as usual. The most important changes may actually be the clean-up of the generated API documentation, including loads of added doc-strings all over the place. Have a look at it here: http://codespeak.net/lxml/api/index.html More documentation patches will definitely be appreciated! Have fun, Stefan 2.0.1 (2008-02-13) Features added * Child iteration in lxml.pyclasslookup. * Loads of new docstrings reflect the signature of functions and methods to make them visible in API docs and help() Bugs fixed * The module lxml.html.builder was duplicated as lxml.htmlbuilder * Form elements would return None for form.fields.keys() if there was an unnamed input field. Now unnamed input fields are completely ignored. * Setting an element slice in objectify could insert slice-overlapping elements at the wrong position. Other changes * The generated API documentation was cleaned up and disburdened from non-public classes etc. * The previously public module lxml.html.setmixin was renamed to lxml.html._setmixin as it is not an official part of lxml. If you want to use it, feel free to copy it over to your own source base. * Passing --with-xslt-config=/path/to/xslt-config to setup.py will override the xslt-config script that is used to determine the C compiler options.
On 2008-02-13 22:58:09 +0100, Stefan Behnel <stefan_ml@behnel.de> said:
Hi all,
lxml 2.0.1 is out, changelog follows as usual.
Works like charm. Thanks. -- Christian Zagrodnick gocept gmbh & co. kg · forsterstrasse 29 · 06112 halle/saale www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891
A quick question. Does this version of lxml fixed segfault bug on Mac OSX? make test passed all test on OSX 10.4.11. $ make test python setup.py build_ext -i Building lxml version 2.0.1. NOTE: Trying to build without Cython, pre-generated 'src/lxml/etree.c' needs to be available. running build_ext copying build/lib.macosx-10.3-i386-2.5/lxml/etree.so -> src/lxml copying build/lib.macosx-10.3-i386-2.5/lxml/objectify.so -> src/lxml copying build/lib.macosx-10.3-i386-2.5/lxml/pyclasslookup.so -> src/lxml python test.py -p -v TESTED VERSION: 2.0.1 Python: (2, 5, 1, 'final', 0) lxml.etree: (2, 0, 1, 0) libxml used: (2, 6, 31) libxml compiled: (2, 6, 31) libxslt used: (1, 1, 22) libxslt compiled: (1, 1, 22) 881/881 (100.0%): Doctest: xpathxslt.txt ---------------------------------------------------------------------- Ran 881 tests in 9.743s OK PYTHONPATH=src python selftest.py 173 tests ok. PYTHONPATH=src python selftest2.py 94 tests ok. On Fri, Feb 15, 2008 at 5:25 PM, Christian Zagrodnick <cz@gocept.com> wrote:
On 2008-02-13 22:58:09 +0100, Stefan Behnel <stefan_ml@behnel.de> said:
Hi all,
lxml 2.0.1 is out, changelog follows as usual.
Works like charm. Thanks.
-- Christian Zagrodnick
gocept gmbh & co. kg · forsterstrasse 29 · 06112 halle/saale www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891
_______________________________________________ lxml-dev mailing list lxml-dev@codespeak.net http://codespeak.net/mailman/listinfo/lxml-dev
Confirmed that the latest lxml still has some problem on OS X. Python 2.5.1 (r251:54863, Feb 2 2008, 17:46:03) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import webbrowser from lxml import etree, html zsh: bus error python2.5
On 2008-02-15 14:30:00 +0100, js <ebgssth@gmail.com> said:
A quick question. Does this version of lxml fixed segfault bug on Mac OSX?
I don't get segfaults on OS X. Using Python 2.4 though. -- Christian Zagrodnick gocept gmbh & co. kg · forsterstrasse 29 · 06112 halle/saale www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891
A quick question. Does this version of lxml fixed segfault bug on Mac OSX?
I don't get segfaults on OS X. Using Python 2.4 though.
I'm using 10.4.11, Python 2.4.4 by MacPorts. Python 2.4.4 (#1, Feb 12 2008, 23:51:38) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import webbrowser from lxml import etree, html etree.LXML_VERSION (2, 0, 1, 0) html.parse('http://example.com') Python(29901) malloc: *** Deallocation of a pointer not malloced: 0x80; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug <lxml.etree._ElementTree object at 0x1481d28>
On 2008-02-16 10:03:38 +0100, js <ebgssth@gmail.com> said:
A quick question. Does this version of lxml fixed segfault bug on Mac OSX?
I don't get segfaults on OS X. Using Python 2.4 though.
I'm using 10.4.11, Python 2.4.4 by MacPorts.
Python 2.4.4 (#1, Feb 12 2008, 23:51:38) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import webbrowser from lxml import etree, html etree.LXML_VERSION (2, 0, 1, 0) html.parse('http://example.com') Python(29901) malloc: *** Deallocation of a pointer not malloced: 0x80; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug <lxml.etree._ElementTree object at 0x1481d28>
% PYTHONPATH=develop-eggs/lxml-2.0.1-py2.4-macosx-10.5-i386.egg ~/development/python/bin/python2.4 Python 2.4.4 (#1, Dec 14 2007, 15:35:42) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import lxml.html lxml.html.parse('http://example.com') <lxml.etree._ElementTree object at 0x539788> import lxml.etree lxml.etree.LXML_VERSION (2, 0, 1, 0) lxml.etree.LIBXML_VERSION (2, 6, 30) lxml.etree.LIBXSLT_VERSION (1, 1, 22)
That is with a manually built python; ibxml2, libxslt and lxml built via buildout. -- Christian Zagrodnick gocept gmbh & co. kg · forsterstrasse 29 · 06112 halle/saale www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891
Try import webbrowser first, then use lxml. I don't know why but this makes difference. On Feb 18, 2008 10:08 PM, Christian Zagrodnick <cz@gocept.com> wrote:
On 2008-02-16 10:03:38 +0100, js <ebgssth@gmail.com> said:
A quick question. Does this version of lxml fixed segfault bug on Mac OSX?
I don't get segfaults on OS X. Using Python 2.4 though.
I'm using 10.4.11, Python 2.4.4 by MacPorts.
Python 2.4.4 (#1, Feb 12 2008, 23:51:38) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import webbrowser from lxml import etree, html etree.LXML_VERSION (2, 0, 1, 0) html.parse('http://example.com') Python(29901) malloc: *** Deallocation of a pointer not malloced: 0x80; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug <lxml.etree._ElementTree object at 0x1481d28>
% PYTHONPATH=develop-eggs/lxml-2.0.1-py2.4-macosx-10.5-i386.egg ~/development/python/bin/python2.4 Python 2.4.4 (#1, Dec 14 2007, 15:35:42) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import lxml.html lxml.html.parse('http://example.com') <lxml.etree._ElementTree object at 0x539788> import lxml.etree lxml.etree.LXML_VERSION (2, 0, 1, 0) lxml.etree.LIBXML_VERSION (2, 6, 30) lxml.etree.LIBXSLT_VERSION (1, 1, 22)
That is with a manually built python; ibxml2, libxslt and lxml built via buildout.
-- Christian Zagrodnick
gocept gmbh & co. kg · forsterstrasse 29 · 06112 halle/saale www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891
_______________________________________________ lxml-dev mailing list lxml-dev@codespeak.net http://codespeak.net/mailman/listinfo/lxml-dev
On 2008-02-18 14:13:25 +0100, js <ebgssth@gmail.com> said:
Try import webbrowser first, then use lxml. I don't know why but this makes difference.
Works as well:
import webbrowser import lxml.html lxml.html.parse('http://example.com') <lxml.etree._ElementTree object at 0x6efd28>
On Feb 18, 2008 10:08 PM, Christian Zagrodnick <cz@gocept.com> wrote:
On 2008-02-16 10:03:38 +0100, js <ebgssth@gmail.com> said:
A quick question. Does this version of lxml fixed segfault bug on Mac OSX?
I don't get segfaults on OS X. Using Python 2.4 though.
I'm using 10.4.11, Python 2.4.4 by MacPorts.
Python 2.4.4 (#1, Feb 12 2008, 23:51:38) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import webbrowser from lxml import etree, html etree.LXML_VERSION (2, 0, 1, 0) html.parse('http://example.com') Python(29901) malloc: *** Deallocation of a pointer not malloced: 0x80; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug <lxml.etree._ElementTree object at 0x1481d28>
% PYTHONPATH=develop-eggs/lxml-2.0.1-py2.4-macosx-10.5-i386.egg ~/development/python/bin/python2.4 Python 2.4.4 (#1, Dec 14 2007, 15:35:42) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import lxml.html lxml.html.parse('http://example.com') <lxml.etree._ElementTree object at 0x539788> import lxml.etree lxml.etree.LXML_VERSION (2, 0, 1, 0) lxml.etree.LIBXML_VERSION (2, 6, 30) lxml.etree.LIBXSLT_VERSION (1, 1, 22)
That is with a manually built python; ibxml2, libxslt and lxml built via buildout.
-- Christian Zagrodnick
gocept gmbh & co. kg · forsterstrasse 29 · 06112 halle/saale www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891
_______________________________________________ lxml-dev mailing list lxml-dev@codespeak.net http://codespeak.net/mailman/listinfo/lxml-dev
-- Christian Zagrodnick gocept gmbh & co. kg · forsterstrasse 29 · 06112 halle/saale www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891
Not lxml's problem but my box's? Could you run it with MacPorts python? Python 2.4.4 (#1, Feb 12 2008, 23:51:38) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import webbrowser import lxml.html lxml.html.parse('http://example.com') Python(21992) malloc: *** Deallocation of a pointer not malloced: 0x80; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug <lxml.etree._ElementTree object at 0x14b7dc8> import lxml.etree lxml.etree.LXML_VERSION (2, 0, 1, 0) lxml.etree.LIBXML_VERSION (2, 6, 31) lxml.etree.LIBXSLT_VERSION (1, 1, 22)
On Feb 18, 2008 10:16 PM, Christian Zagrodnick <cz@gocept.com> wrote:
On 2008-02-18 14:13:25 +0100, js <ebgssth@gmail.com> said:
Try import webbrowser first, then use lxml. I don't know why but this makes difference.
Works as well:
import webbrowser import lxml.html lxml.html.parse('http://example.com') <lxml.etree._ElementTree object at 0x6efd28>
On Feb 18, 2008 10:08 PM, Christian Zagrodnick <cz@gocept.com> wrote:
On 2008-02-16 10:03:38 +0100, js <ebgssth@gmail.com> said:
A quick question. Does this version of lxml fixed segfault bug on Mac OSX?
I don't get segfaults on OS X. Using Python 2.4 though.
I'm using 10.4.11, Python 2.4.4 by MacPorts.
Python 2.4.4 (#1, Feb 12 2008, 23:51:38) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type "help", "copyright", "credits" or "license" for more information.
> import webbrowser > from lxml import etree, html > etree.LXML_VERSION (2, 0, 1, 0) > html.parse('http://example.com') Python(29901) malloc: *** Deallocation of a pointer not malloced: 0x80; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug <lxml.etree._ElementTree object at 0x1481d28>
% PYTHONPATH=develop-eggs/lxml-2.0.1-py2.4-macosx-10.5-i386.egg ~/development/python/bin/python2.4 Python 2.4.4 (#1, Dec 14 2007, 15:35:42) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import lxml.html lxml.html.parse('http://example.com') <lxml.etree._ElementTree object at 0x539788> import lxml.etree lxml.etree.LXML_VERSION (2, 0, 1, 0) lxml.etree.LIBXML_VERSION (2, 6, 30) lxml.etree.LIBXSLT_VERSION (1, 1, 22)
That is with a manually built python; ibxml2, libxslt and lxml built via buildout.
-- Christian Zagrodnick
gocept gmbh & co. kg · forsterstrasse 29 · 06112 halle/saale www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891
_______________________________________________ lxml-dev mailing list lxml-dev@codespeak.net http://codespeak.net/mailman/listinfo/lxml-dev
--
Christian Zagrodnick
gocept gmbh & co. kg · forsterstrasse 29 · 06112 halle/saale www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891
_______________________________________________ lxml-dev mailing list lxml-dev@codespeak.net http://codespeak.net/mailman/listinfo/lxml-dev
On 2008-02-18 14:57:28 +0100, js <ebgssth@gmail.com> said:
Not lxml's problem but my box's? Could you run it with MacPorts python?
Sorry, I don't use MacPorts. Try with a self-compiled python. -- Christian Zagrodnick gocept gmbh & co. kg · forsterstrasse 29 · 06112 halle/saale www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891
Tried with self-compiled python. (revision 60972, python 2.6) The result was the same. Could you tell me how you installed lxml? On Mon, Feb 18, 2008 at 11:02 PM, Christian Zagrodnick <cz@gocept.com> wrote:
On 2008-02-18 14:57:28 +0100, js <ebgssth@gmail.com> said:
Not lxml's problem but my box's? Could you run it with MacPorts python?
Sorry, I don't use MacPorts.
Try with a self-compiled python.
--
Christian Zagrodnick
gocept gmbh & co. kg · forsterstrasse 29 · 06112 halle/saale www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891
_______________________________________________ lxml-dev mailing list lxml-dev@codespeak.net http://codespeak.net/mailman/listinfo/lxml-dev
Hi, js wrote:
A quick question. Does this version of lxml fixed segfault bug on Mac OSX? I don't get segfaults on OS X. Using Python 2.4 though.
I'm using 10.4.11, Python 2.4.4 by MacPorts.
Python 2.4.4 (#1, Feb 12 2008, 23:51:38) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import webbrowser from lxml import etree, html etree.LXML_VERSION (2, 0, 1, 0) html.parse('http://example.com') Python(29901) malloc: *** Deallocation of a pointer not malloced: 0x80; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug <lxml.etree._ElementTree object at 0x1481d28>
This information is definitely not enough for me to get an idea about what happens here. That said, could you try passing the "--auto-rpath" option to setup.py when building? I'd like to know if that makes a difference. You should then see an option "rpath" (or "install_name"??) in the gcc command line. And please also make sure that the "xslt-config" that setup.py finds is the one that comes with the updated libxml2/libxslt libraries, *not* the one pre-installed on your system. Stefan
Hi, I tried passing --auto-rpath to setup.py, but rpath didn't came up in gcc line. xslt-config seems right one for me because this seemed using /opt/local's ones. Any clues? $ sudo python2.5 setup.py --auto-rpath build Building lxml version 2.0.1. NOTE: Trying to build without Cython, pre-generated 'src/lxml/etree.c' needs to be available. running build running build_py creating build creating build/lib.macosx-10.3-i386-2.5 creating build/lib.macosx-10.3-i386-2.5/lxml copying src/lxml/__init__.py -> build/lib.macosx-10.3-i386-2.5/lxml copying src/lxml/_elementpath.py -> build/lib.macosx-10.3-i386-2.5/lxml copying src/lxml/builder.py -> build/lib.macosx-10.3-i386-2.5/lxml copying src/lxml/cssselect.py -> build/lib.macosx-10.3-i386-2.5/lxml copying src/lxml/doctestcompare.py -> build/lib.macosx-10.3-i386-2.5/lxml copying src/lxml/ElementInclude.py -> build/lib.macosx-10.3-i386-2.5/lxml copying src/lxml/sax.py -> build/lib.macosx-10.3-i386-2.5/lxml copying src/lxml/usedoctest.py -> build/lib.macosx-10.3-i386-2.5/lxml creating build/lib.macosx-10.3-i386-2.5/lxml/html copying src/lxml/html/__init__.py -> build/lib.macosx-10.3-i386-2.5/lxml/html copying src/lxml/html/_dictmixin.py -> build/lib.macosx-10.3-i386-2.5/lxml/html copying src/lxml/html/_diffcommand.py -> build/lib.macosx-10.3-i386-2.5/lxml/html copying src/lxml/html/_setmixin.py -> build/lib.macosx-10.3-i386-2.5/lxml/html copying src/lxml/html/builder.py -> build/lib.macosx-10.3-i386-2.5/lxml/html copying src/lxml/html/clean.py -> build/lib.macosx-10.3-i386-2.5/lxml/html copying src/lxml/html/defs.py -> build/lib.macosx-10.3-i386-2.5/lxml/html copying src/lxml/html/diff.py -> build/lib.macosx-10.3-i386-2.5/lxml/html copying src/lxml/html/ElementSoup.py -> build/lib.macosx-10.3-i386-2.5/lxml/html copying src/lxml/html/formfill.py -> build/lib.macosx-10.3-i386-2.5/lxml/html copying src/lxml/html/usedoctest.py -> build/lib.macosx-10.3-i386-2.5/lxml/html running build_ext building 'lxml.etree' extension creating build/temp.macosx-10.3-i386-2.5 creating build/temp.macosx-10.3-i386-2.5/src creating build/temp.macosx-10.3-i386-2.5/src/lxml /usr/bin/gcc-4.0 -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include/python2.5 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.3-i386-2.5/src/lxml/lxml.etree.o -w /usr/bin/gcc-4.0 -L/opt/local/lib -bundle -undefined dynamic_lookup build/temp.macosx-10.3-i386-2.5/src/lxml/lxml.etree.o -L/opt/local/lib -L/opt/local/lib -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.3-i386-2.5/lxml/etree.so building 'lxml.objectify' extension /usr/bin/gcc-4.0 -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include/python2.5 -c src/lxml/lxml.objectify.c -o build/temp.macosx-10.3-i386-2.5/src/lxml/lxml.objectify.o -w /usr/bin/gcc-4.0 -L/opt/local/lib -bundle -undefined dynamic_lookup build/temp.macosx-10.3-i386-2.5/src/lxml/lxml.objectify.o -L/opt/local/lib -L/opt/local/lib -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.3-i386-2.5/lxml/objectify.so building 'lxml.pyclasslookup' extension /usr/bin/gcc-4.0 -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include/python2.5 -c src/lxml/lxml.pyclasslookup.c -o build/temp.macosx-10.3-i386-2.5/src/lxml/lxml.pyclasslookup.o -w /usr/bin/gcc-4.0 -L/opt/local/lib -bundle -undefined dynamic_lookup build/temp.macosx-10.3-i386-2.5/src/lxml/lxml.pyclasslookup.o -L/opt/local/lib -L/opt/local/lib -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.3-i386-2.5/lxml/pyclasslookup.so On 2/18/08, Stefan Behnel <stefan_ml@behnel.de> wrote:
Hi,
js wrote:
A quick question. Does this version of lxml fixed segfault bug on Mac OSX? I don't get segfaults on OS X. Using Python 2.4 though.
I'm using 10.4.11, Python 2.4.4 by MacPorts.
Python 2.4.4 (#1, Feb 12 2008, 23:51:38) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import webbrowser from lxml import etree, html etree.LXML_VERSION (2, 0, 1, 0) html.parse('http://example.com') Python(29901) malloc: *** Deallocation of a pointer not malloced: 0x80; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug <lxml.etree._ElementTree object at 0x1481d28>
This information is definitely not enough for me to get an idea about what happens here.
That said, could you try passing the "--auto-rpath" option to setup.py when building? I'd like to know if that makes a difference. You should then see an option "rpath" (or "install_name"??) in the gcc command line.
And please also make sure that the "xslt-config" that setup.py finds is the one that comes with the updated libxml2/libxslt libraries, *not* the one pre-installed on your system.
Stefan
participants (3)
-
Christian Zagrodnick
-
js
-
Stefan Behnel