- Package:
- python3-lxml
- Source:
- lxml
- Description:
- pythonic binding for the libxml2 and libxslt libraries
- Submitter:
- Jakub Wilk
- Date:
- 2021-10-03 16:24:02 UTC
- Severity:
- normal
After upgrading libxml2 to 2.9.12+dfsg-3, the tostring() function
started returning strings with some trailing junk:
>>> import lxml.etree
>>> html = lxml.etree.fromstring('<html><p>P</p></html>')
>>> lxml.etree.tostring(html[0])
b'<p>P</p></html>'
This worked fine with libxml2 2.9.10+dfsg-6.7:
>>> lxml.etree.tostring(html[0])
b'<p>P</p>'
Hi, Any news about this bug ? Is this handled by upstream ? Some urlwatch tests are failing due to this bug. I can't release a new version. I hope someone has good news about this bug. Thanks Maxime -- Maxime Werlen
* Jakub Wilk <jwilk@jwilk.net>, 2021-09-03, 17:35: This is no longer reproducible with libxml2 2.9.12+dfsg-5, presumably because this commit was cherry-picked: https://gitlab.gnome.org/GNOME/libxml2/-/commit/85b1792e37b131e7 ("Work around lxml API abuse")
I confirm, all tests are OK with new version. Thanks, Maxime Le ven. 1 oct. 2021 à 13:48, Jakub Wilk <jwilk@jwilk.net> a écrit :