Repository: python-beaver/python-conf_d

Issue:
ConfigParser not found
ConfigParse has changed to  configparser in Python3, when install Beaver from pip, the problem occurs and leads the installation to failure. 

Comments:

Patch:
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..21fef2c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+# build files
+*.pyc
+__pycache__
+*.egg-info
+.eggs
+dist
+build
+.tox
diff --git a/README.rst b/README.rst
index 2599913..a2a0ac8 100644
--- a/README.rst
+++ b/README.rst
@@ -7,7 +7,7 @@ read configuration files, conf.d style
 Requirements
 ============
 
-* Python 2.6+
+* Python 2.6+ or Python 3.4+
 
 Installation
 ============
@@ -20,7 +20,7 @@ From Github::
 
 From PyPI::
 
-    pip install conf_d==0.0.3
+    pip install conf_d==0.0.5
 
 Usage
 =====
diff --git a/conf_d/__init__.py b/conf_d/__init__.py
index a18e3a0..bd55dcc 100644
--- a/conf_d/__init__.py
+++ b/conf_d/__init__.py
@@ -1,13 +1,14 @@
 # -*- coding: utf-8 -*-
-import ConfigParser
 import os
 
-__version__ = '0.0.4'
+from conf_d.compat import ConfigParser
+
+__version__ = '0.0.5'
 
 
 class Configuration():
 
-    def __init__(self, name, path, parse=True, confd_path=None, conf_ext=None, main_defaults={}, section_defaults={}, main_parser=None, section_parser=None, path_from_main=None, config_parser=ConfigParser.ConfigParser):
+    def __init__(self, name, path, parse=True, confd_path=None, conf_ext=None, main_defaults={}, section_defaults={}, main_parser=None, section_parser=None, path_from_main=None, config_parser=ConfigParser):
         self._conf_ext = conf_ext
         self._config_sections = {}
         self._confd_path = confd_path
diff --git a/conf_d/compat.py b/conf_d/compat.py
new file mode 100644
index 0000000..7d0e1fe
--- /dev/null
+++ b/conf_d/compat.py
@@ -0,0 +1,7 @@
+# -*- coding: utf-8 -*-
+from sys import version_info
+
+if version_info[0] < 3:
+    from ConfigParser import ConfigParser
+else:
+    from configparser import ConfigParser
diff --git a/setup.py b/setup.py
index fd655b7..2b142ee 100644
--- a/setup.py
+++ b/setup.py
@@ -33,6 +33,10 @@ setup(
         'License :: OSI Approved :: MIT License',
         'Programming Language :: Python :: 2.6',
         'Programming Language :: Python :: 2.7',
+        'Programming Language :: Python :: 3.4',
+        'Programming Language :: Python :: 3.5',
+        'Programming Language :: Python :: 3.6',
+        'Programming Language :: Python :: 3.7',
     ],
     description='read configuration files, conf.d style',
     long_description=open('README.rst').read() + '\n\n' +
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..607ed8e
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,6 @@
+[tox]
+envlist = py26,py27,py34,py35,py36,py37
+
+[testenv]
+commands=
+   python setup.py test


Test patch:
diff --git a/conf_d/tests/test_configuration.py b/conf_d/tests/test_configuration.py
index f04143c..d8b64d0 100644
--- a/conf_d/tests/test_configuration.py
+++ b/conf_d/tests/test_configuration.py
@@ -1,10 +1,11 @@
 # -*- coding: utf-8 -*-
-import ConfigParser
 import unittest
 
 from conf_d import Configuration
+from conf_d.compat import ConfigParser
 
-class TestConfigParser(ConfigParser.ConfigParser):
+
+class TestConfigParser(ConfigParser):
     def read(self, path):
         raise NotImplementedError('Catch this')