diff options
author | Ask Solem <askh@opera.com> | 2010-12-03 11:14:56 +0100 |
---|---|---|
committer | Ask Solem <askh@opera.com> | 2010-12-03 12:55:41 +0100 |
commit | 2bf695de2ff95263d0d54ca454f377e560913b52 (patch) | |
tree | ea3288338524bf13504d922ea78a9d332935f62a /kombu/utils/compat.py | |
parent | dec4d12d4234c5d5cadf64d04fb6ec14debd93c0 (diff) | |
download | kombu-2bf695de2ff95263d0d54ca454f377e560913b52.tar.gz |
Unit tests now passing on Python 3
Diffstat (limited to 'kombu/utils/compat.py')
-rw-r--r-- | kombu/utils/compat.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kombu/utils/compat.py b/kombu/utils/compat.py index 703ad959..f86336d4 100644 --- a/kombu/utils/compat.py +++ b/kombu/utils/compat.py @@ -38,7 +38,7 @@ class _Link(object): __slots__ = 'prev', 'next', 'key', '__weakref__' -class OrderedDict(dict, MutableMapping): +class CompatOrderedDict(dict, MutableMapping): """Dictionary that remembers insertion order""" # An inherited dict maps keys to values. # The inherited dict provides __getitem__, __len__, __contains__, and get. @@ -232,3 +232,8 @@ class OrderedDict(dict, MutableMapping): def __ne__(self, other): return not (self == other) + +try: + from collections import OrderedDict +except ImportError: + OrderedDict = CompatOrderedDict |