summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraa-turner <aa-turner@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2023-04-24 16:37:37 +0000
committeraa-turner <aa-turner@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2023-04-24 16:37:37 +0000
commitacb44ff53095c134afa0938eef2a486c161bb71a (patch)
tree64a4f3b0ab4bc1824e58b623f4a97db105cf08b1
parent505926e5a26ee39327c88e54f89d558b15f43061 (diff)
downloaddocutils-acb44ff53095c134afa0938eef2a486c161bb71a.tar.gz
Suppress ``CSVTable.HeaderDialect()`` deprecation warning
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9363 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
-rw-r--r--docutils/docutils/parsers/rst/directives/tables.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/docutils/docutils/parsers/rst/directives/tables.py b/docutils/docutils/parsers/rst/directives/tables.py
index 446034828..8212f2cfc 100644
--- a/docutils/docutils/parsers/rst/directives/tables.py
+++ b/docutils/docutils/parsers/rst/directives/tables.py
@@ -64,8 +64,11 @@ class Table(Directive):
table_head = []
max_header_cols = 0
if 'header' in self.options: # separate table header in option
+ with warnings.catch_warnings():
+ warnings.simplefilter('ignore')
+ header_dialect = self.HeaderDialect()
rows, max_header_cols = self.parse_csv_data_into_rows(
- self.options['header'].split('\n'), self.HeaderDialect(),
+ self.options['header'].split('\n'), header_dialect,
source)
table_head.extend(rows)
return table_head, max_header_cols