Docutils 0.13 API change break rstFlatTable extension used by Linux kernel documentation: get_column_widths changes

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

 



Hi

(I have not found if that was already reported, apologies if I missed
aprevious report on this already):

As reported via https://sourceforge.net/p/docutils/bugs/303/ changes
to Docutils's, in particular to the get_column_widths() method causes
the Kernel documentation failing to build via sphinx.

The sphinx log generated is (in my example for the 4.8.15 build in
Debian):

# Sphinx version: 1.4.9
# Python version: 2.7.13rc1 (CPython)
# Docutils version: 0.13.1 release
# Jinja2 version: 2.8
# Last messages:
#   writing output... [  0%] gpu/drm-kms
#   writing output... [  0%] gpu/drm-kms-helpers
#   writing output... [  0%] gpu/drm-mm
#   writing output... [  1%] gpu/drm-uapi
#   writing output... [  1%] gpu/i915
#   writing output... [  1%] gpu/index
#   writing output... [  1%] gpu/introduction
#   writing output... [  1%] gpu/vga-switcheroo
#   writing output... [  2%] index
#   writing output... [  2%] kernel-documentation
# Loaded extensions:
#   kernel-doc (unknown version) from /builds/linux-4.8.15/Documentation/sphinx/kernel-doc.pyc
#   rstFlatTable (unknown version) from /builds/linux-4.8.15/Documentation/sphinx/rstFlatTable.pyc
#   kernel_include (unknown version) from /builds/linux-4.8.15/Documentation/sphinx/kernel_include.pyc
#   alabaster (0.7.8) from /usr/lib/python2.7/dist-packages/alabaster/__init__.pyc
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/sphinx/cmdline.py", line 244, in main
    app.build(opts.force_all, filenames)
  File "/usr/lib/python2.7/dist-packages/sphinx/application.py", line 297, in build
    self.builder.build_update()
  File "/usr/lib/python2.7/dist-packages/sphinx/builders/__init__.py", line 251, in build_update
    'out of date' % len(to_build))
  File "/usr/lib/python2.7/dist-packages/sphinx/builders/__init__.py", line 322, in build
    self.write(docnames, list(updated_docnames), method)
  File "/usr/lib/python2.7/dist-packages/sphinx/builders/__init__.py", line 360, in write
    self._write_serial(sorted(docnames), warnings)
  File "/usr/lib/python2.7/dist-packages/sphinx/builders/__init__.py", line 368, in _write_serial
    self.write_doc(docname, doctree)
  File "/usr/lib/python2.7/dist-packages/sphinx/builders/html.py", line 448, in write_doc
    self.docwriter.write(doctree, destination)
  File "/usr/lib/python2.7/dist-packages/docutils/writers/__init__.py", line 80, in write
    self.translate()
  File "/usr/lib/python2.7/dist-packages/sphinx/writers/html.py", line 48, in translate
    self.document.walkabout(visitor)
  File "/usr/lib/python2.7/dist-packages/docutils/nodes.py", line 174, in walkabout
    if child.walkabout(visitor):
  File "/usr/lib/python2.7/dist-packages/docutils/nodes.py", line 174, in walkabout
    if child.walkabout(visitor):
  File "/usr/lib/python2.7/dist-packages/docutils/nodes.py", line 174, in walkabout
    if child.walkabout(visitor):
  File "/usr/lib/python2.7/dist-packages/docutils/nodes.py", line 174, in walkabout
    if child.walkabout(visitor):
  File "/usr/lib/python2.7/dist-packages/docutils/nodes.py", line 174, in walkabout
    if child.walkabout(visitor):
  File "/usr/lib/python2.7/dist-packages/docutils/nodes.py", line 174, in walkabout
    if child.walkabout(visitor):
  File "/usr/lib/python2.7/dist-packages/docutils/nodes.py", line 174, in walkabout
    if child.walkabout(visitor):
  File "/usr/lib/python2.7/dist-packages/docutils/nodes.py", line 166, in walkabout
    visitor.dispatch_visit(self)
  File "/usr/lib/python2.7/dist-packages/docutils/nodes.py", line 1882, in dispatch_visit
    return method(node)
  File "/usr/lib/python2.7/dist-packages/docutils/writers/html4css1/__init__.py", line 765, in visit_tbody
    self.write_colspecs()
  File "/usr/lib/python2.7/dist-packages/docutils/writers/html4css1/__init__.py", line 289, in write_colspecs
    width += node['colwidth']
TypeError: unsupported operand type(s) for +=: 'int' and 'str'

If I read https://sourceforge.net/p/docutils/bugs/303/ correctly, then
the API changes was introduced on purpose to address/implement
https://sourceforge.net/p/docutils/patches/120/, so I guess the
expectation is to "consumers" th adapt their code.

Regards,
Salvatore
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux