OSDN Git Service

docs: sphinx-extensions: make rstFlatTable work with docutils 0.13
authorDmitry Shachnev <mitya57@debian.org>
Sun, 18 Dec 2016 10:11:46 +0000 (13:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Jan 2017 07:32:18 +0000 (08:32 +0100)
commit5bd6ccd9c95fdf068e125e08992c7424eb2ceabb
tree0a03c8aa21ad3e497b07c6e3872119a9a8f68279
parentfab303ba78ee2bae3da057f750139fc6222c66d5
docs: sphinx-extensions: make rstFlatTable work with docutils 0.13

commit 217e2bfab22e740227df09f22165e834cddd8a3b upstream.

In docutils 0.13, the return type of get_column_widths method of the
Table directive has changed [1], which breaks our flat-table directive
and leads to a TypeError when trying to build the docs [2].

This patch adds support for the new return type, while keeping support
for older docutils versions too.

[1] https://sourceforge.net/p/docutils/patches/120/
[2] https://sourceforge.net/p/docutils/bugs/303/

Signed-off-by: Dmitry Shachnev <mitya57@debian.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/sphinx/rstFlatTable.py