From 9c1774976925fbd9ee2fd4abac7101f8ae00dc73 Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Thu, 27 Jan 2011 11:40:30 +0100 Subject: [PATCH] Import SimpleQueue/SimpleBuffer lazily --- kombu/connection.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kombu/connection.py b/kombu/connection.py index b60e006f..4eb06d9e 100644 --- a/kombu/connection.py +++ b/kombu/connection.py @@ -16,7 +16,6 @@ from Queue import Empty, Queue as _Queue from kombu import exceptions from kombu.transport import get_transport_cls -from kombu.simple import SimpleQueue, SimpleBuffer from kombu.utils import retry_over_time from kombu.utils.compat import OrderedDict from kombu.utils.functional import wraps @@ -332,6 +331,8 @@ class BrokerConnection(object): object. """ + from kombu.simple import SimpleQueue + channel_autoclose = False if channel is None: channel = self.channel() @@ -350,6 +351,8 @@ class BrokerConnection(object): and acknowledgements are disabled (``no_ack``). """ + from kombu.simple import SimpleBuffer + channel_autoclose = False if channel is None: channel = self.channel()