aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Hurst2019-08-29 13:28:44 -0600
committerGitHub2019-08-29 13:28:44 -0600
commit5d27e9a6cabecf357b26216b7afb0880bbaf36ef (patch)
treeffb3ea079d713fa8428ceda9477844564b16116a
parentcec5028f9c85ed567e93cdf84e7f7816fde0d279 (diff)
parent1dc6bb3c691bf4698606d5803e6e208d5b1cfddd (diff)
downloadeventmq-5d27e9a6cabecf357b26216b7afb0880bbaf36ef.tar.gz
eventmq-5d27e9a6cabecf357b26216b7afb0880bbaf36ef.zip
Merge pull request #70 from RegionSyx/feature/add-missing-dependency0.3.10
Add Python 2/3 Compatibility with configparser
-rw-r--r--eventmq/__init__.py2
-rw-r--r--eventmq/tests/test_utils.py11
-rw-r--r--eventmq/utils/settings.py9
3 files changed, 19 insertions, 3 deletions
diff --git a/eventmq/__init__.py b/eventmq/__init__.py
index 018a540..1515f24 100644
--- a/eventmq/__init__.py
+++ b/eventmq/__init__.py
@@ -1,5 +1,5 @@
1__author__ = 'EventMQ Contributors' 1__author__ = 'EventMQ Contributors'
2__version__ = '0.3.10-rc1' 2__version__ = '0.3.10'
3 3
4PROTOCOL_VERSION = 'eMQP/1.0' 4PROTOCOL_VERSION = 'eMQP/1.0'
5 5
diff --git a/eventmq/tests/test_utils.py b/eventmq/tests/test_utils.py
index 2937085..501b081 100644
--- a/eventmq/tests/test_utils.py
+++ b/eventmq/tests/test_utils.py
@@ -12,7 +12,16 @@
12# 12#
13# You should have received a copy of the GNU Lesser General Public License 13# You should have received a copy of the GNU Lesser General Public License
14# along with eventmq. If not, see <http://www.gnu.org/licenses/>. 14# along with eventmq. If not, see <http://www.gnu.org/licenses/>.
15from configparser import ConfigParser 15
16#
17
18# ConfigParser was renamed to configparser in python 3. Do this try...except
19# to maintain python 2/3 compatability
20try:
21 from configparser import ConfigParser
22except ImportError:
23 import ConfigParser
24
16from imp import reload 25from imp import reload
17import io 26import io
18import os 27import os
diff --git a/eventmq/utils/settings.py b/eventmq/utils/settings.py
index 7a91858..ade76c2 100644
--- a/eventmq/utils/settings.py
+++ b/eventmq/utils/settings.py
@@ -16,7 +16,14 @@
16:mod:`settings` -- Settings Utilities 16:mod:`settings` -- Settings Utilities
17===================================== 17=====================================
18""" 18"""
19from configparser import ConfigParser, NoOptionError 19
20# ConfigParser was renamed to configparser in python 3. Do this try...except
21# to maintain python 2/3 compatability
22try:
23 from configparser import ConfigParser, NoOptionError
24except ImportError:
25 from ConfigParser import ConfigParser, NoOptionError
26
20import json 27import json
21import logging 28import logging
22import os 29import os