summaryrefslogtreecommitdiff
path: root/singledispatch_helpers.py
diff options
context:
space:
mode:
author?ukasz Langa <lukasz@langa.pl>2013-05-26 00:02:51 +0200
committer?ukasz Langa <lukasz@langa.pl>2013-05-26 00:02:51 +0200
commit6a3ac50c476620e9aed3ff3c70ba539e7b6d7d1c (patch)
treee180e320d97d3cef67d265a0266d69a5d84a790e /singledispatch_helpers.py
parentffa12b2ae9b9b4ae1e2519414cf784e896832424 (diff)
downloadsingledispatch-6a3ac50c476620e9aed3ff3c70ba539e7b6d7d1c.tar.gz
make tests pass on Python 2.6 - 3.33.4.0.0
Diffstat (limited to 'singledispatch_helpers.py')
-rw-r--r--singledispatch_helpers.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/singledispatch_helpers.py b/singledispatch_helpers.py
index 5c4aa8b..2141568 100644
--- a/singledispatch_helpers.py
+++ b/singledispatch_helpers.py
@@ -7,7 +7,15 @@ from __future__ import print_function
from __future__ import unicode_literals
from abc import ABCMeta
-from collections import MutableMapping, UserDict
+from collections import MutableMapping
+try:
+ from collections import UserDict
+except ImportError:
+ from UserDict import UserDict
+try:
+ from collections import OrderedDict
+except ImportError:
+ from ordereddict import OrderedDict
try:
from thread import get_ident
except ImportError:
@@ -142,7 +150,7 @@ class ChainMap(MutableMapping):
class MappingProxyType(UserDict):
def __init__(self, data):
- super(MappingProxyType, self).__init__()
+ UserDict.__init__(self)
self.data = data