#993605 lxml.etree.tostring() trailing junk

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
#993605#5
Date:
2021-09-03 15:35:08 UTC
From:
To:
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>'

#993605#12
Date:
2021-09-09 18:38:39 UTC
From:
To:
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

#993605#15
Date:
2021-10-01 11:45:13 UTC
From:
To:
* 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")

#993605#20
Date:
2021-10-03 16:20:04 UTC
From:
To:
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 :