From 4b539f85f480a1bc133515bda91847458b069482 Mon Sep 17 00:00:00 2001 From: Thomas Ward Date: Fri, 12 May 2017 11:48:26 -0400 Subject: [PATCH] Py2/3 Compatible Imports for ConfigParser Py3 renamed 'ConfigParser' to 'configparser'. This fails on Py3 setup, because it tries to import 'ConfigParser' and not 'configparser'. Otherwise it should work identically. --- setup_posix.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup_posix.py b/setup_posix.py index cfcf33ca..56caa574 100644 --- a/setup_posix.py +++ b/setup_posix.py @@ -1,5 +1,8 @@ import os, sys -from ConfigParser import SafeConfigParser +if sys.version_info.major >= 3: + from configparser import SafeConfigParser +else: + from ConfigParser import SafeConfigParser # This dequote() business is required for some older versions # of mysql_config