From c70c1dc36ee231007179f5a2cd03208416a907b8 Mon Sep 17 00:00:00 2001 From: Luong Anh Tuan Date: Mon, 28 Nov 2016 09:07:14 +0700 Subject: [PATCH] Use ConfigParser instead of SafeConfigParser in Python 3 The SafeConfigParser class has been renamed to ConfigParser in Python 3.2 [1]. The alias SafeConfigParser maybe removed in future versions of Python 3. Use ConfigParser instead of SafeConfigParser in Python 3 [1] http://bugs.python.org/issue10627 Change-Id: I1403de0ccc554472333d6fa0fbb55cdc31dce05f Closes-Bug: #1618666 --- doc/ext/support_matrix.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/ext/support_matrix.py b/doc/ext/support_matrix.py index 67e9b44d..18b25265 100644 --- a/doc/ext/support_matrix.py +++ b/doc/ext/support_matrix.py @@ -128,8 +128,10 @@ class SupportMatrixDirective(rst.Directive): :returns: SupportMatrix instance """ - - cfg = configparser.SafeConfigParser() + if six.PY3: + cfg = configparser.ConfigParser() + else: + cfg = configparser.SafeConfigParser() env = self.state.document.settings.env fname = self.arguments[0] rel_fpath, fpath = env.relfn2path(fname)