[xml] [PATCH] python 3 bindings call "decode" on "str" object



with python3-libxml2-2.9.3-2.fc23.x86_64 RPM i get this exception:

Traceback (most recent call last):
  File "/usr/lib64/python3.4/threading.py", line 920, in _bootstrap_inner
    self.run()
  File "/data/lo/master/bin/get-bugzilla-attachments-by-mimetype", line 515, in run
    get_through_rss_query(uri, mimetype, prefix, extension)
  File "/data/lo/master/bin/get-bugzilla-attachments-by-mimetype", line 264, in get_through_rss_query
    process(query, True, get_file_bz_ids(files, prefix))
  File "/data/lo/master/bin/get-bugzilla-attachments-by-mimetype", line 226, in process
    d = feedparser.parse(url)
  File "/usr/lib/python3.4/site-packages/feedparser.py", line 3957, in parse
    saxparser.parse(source)
  File "/usr/lib64/python3.4/site-packages/drv_libxml2.py", line 189, in parse
    eltName = (_d(reader.NamespaceUri()),\
  File "/usr/lib64/python3.4/site-packages/drv_libxml2.py", line 70, in _d
    return _decoder(s)[0]
  File "/usr/lib64/python3.4/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
TypeError: 'str' does not support the buffer interface

looks like python/types.c actually creates Unicode str that don't
benefit from decoding:

#define PY_IMPORT_STRING PyUnicode_FromString

Attachment: 0001-python-3-libxml2.c-wrappers-create-Unicode-str-alrea.patch
Description: Text Data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]