Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Django users can live with another dependency.

  • Loading branch information...
commit 4eb60aed66d5f27f6b09734c1d3d192de98d828b 1 parent 4bdd467
Ask Solem authored
Showing with 7 additions and 14 deletions.
  1. +4 −7 ghettoq/taproot.py
  2. +3 −7 setup.py
View
11 ghettoq/taproot.py
@@ -14,12 +14,9 @@
try:
- from collections import OrderedDict as SortedDict
+ from collections import OrderedDict
except ImportError:
- try:
- from django.utils.datastructures import SortedDict
- except ImportError:
- from odict import odict as SortedDict
+ from odict import odict as OrderedDict
class QualityOfService(object):
@@ -30,7 +27,7 @@ def __init__(self, backend, resource, prefetch_count=None,
self.resource = resource
self.prefetch_count = prefetch_count
self.interval = interval
- self._delivered = SortedDict()
+ self._delivered = OrderedDict()
self._restored_once = False
atexit.register(self.restore_unacked_once)
@@ -51,7 +48,7 @@ def restore_unacked(self):
message.content_encoding)
send["destination"] = queue_name
self.resource.put(queue_name, serialize(send))
- self._delivered = SortedDict()
+ self._delivered = OrderedDict()
def requeue(self, delivery_tag):
try:
View
10 setup.py
@@ -27,14 +27,10 @@
if sys.version_info < (2, 5):
install_requires.append("uuid")
-# We rely on a sorted dictionary implementation and use either python's
-# build-in OrderedDict, Django's SortedDict or odict.
-
+# We rely on a sorted dictionary implementation and use either Python's
+# built-in OrderedDict or the odict module.
if sys.version_info < (2, 7):
- try:
- import django
- except ImportError:
- install_requires.append("odict")
+ install_requires.append("odict")
def osx_install_data(install_data):
Please sign in to comment.
Something went wrong with that request. Please try again.