FS#48878 - [libxml2] python3 bindings for libxml2 break at least feedparser

Attached to Project: Arch Linux
Opened by Abdó Roig-Maranges (abdo) - Sunday, 10 April 2016, 21:02 GMT
Last edited by Jan de Groot (JGC) - Tuesday, 12 April 2016, 08:37 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Jan de Groot (JGC)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

Updating to libxml2 2.9.3-2 breaks at least feedparser library due to the addition of python3 bindings.


Steps to reproduce:

To reproduce run this piece of python code:

import feedparser
import urllib.request
f = urllib.request.urlopen("https://planet.archlinux.org/rss20.xml")
print(feedparser.parse(f))

It prints the planet arch rss feed before 2.9.3-2, but with 2.9.3-2 errors out:

Traceback (most recent call last):
File "test.py", line 7, in <module>
print(feedparser.parse(f))
File "/usr/lib/python3.5/site-packages/feedparser.py", line 3957, in parse
saxparser.parse(source)
File "/usr/lib/python3.5/site-packages/drv_libxml2.py", line 190, in parse
_d(reader.LocalName()))
File "/usr/lib/python3.5/site-packages/drv_libxml2.py", line 70, in _d
return _decoder(s)[0]
File "/usr/lib/python3.5/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
TypeError: a bytes-like object is required, not 'str'

This task depends upon

Closed by  Jan de Groot (JGC)
Tuesday, 12 April 2016, 08:37 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in 2.9.3+14+gd5bd2a9-1
Comment by Abdó Roig-Maranges (abdo) - Monday, 11 April 2016, 07:48 GMT
It looks like there is an upstream fix https://git.gnome.org/browse/libxml2/commit/?id=65112cb36aa56bb27697c38ff52c1489cc21cba5. I have not tested it though.

Loading...