summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsk Solem <ask@celeryproject.org>2014-01-13 16:26:26 +0000
committerAsk Solem <ask@celeryproject.org>2014-01-13 16:26:26 +0000
commit6f4ed3469f2582ff63a8e6c58dd0b451f19ec12e (patch)
treec5761cab90e0f93a287aee0b07fa8dfca99d50a5
parentb29be9e24d46ae6c1b494cde83663e159eb20598 (diff)
downloadpy-amqp-6f4ed3469f2582ff63a8e6c58dd0b451f19ec12e.tar.gz
Make sure exchange auto_delete deprecation warning is visible. Closes celery/kombu#296
-rw-r--r--amqp/channel.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/amqp/channel.py b/amqp/channel.py
index ea59f0c..05eb09a 100644
--- a/amqp/channel.py
+++ b/amqp/channel.py
@@ -31,6 +31,15 @@ __all__ = ['Channel']
AMQP_LOGGER = logging.getLogger('amqp')
+EXCHANGE_AUTODELETE_DEPRECATED = """\
+The auto_delete flag for exchanges has been deprecated and will be removed
+from py-amqp v1.5.0.\
+"""
+
+
+class VDeprecationWarning(DeprecationWarning):
+ pass
+
class Channel(AbstractChannel):
"""Work with channels
@@ -604,8 +613,7 @@ class Channel(AbstractChannel):
self._send_method((40, 10), args)
if auto_delete:
- warn(DeprecationWarning(
- 'auto_delete exchanges has been deprecated'))
+ warn(VDeprecationWarning(EXCHANGE_AUTODELETE_DEPRECATED))
if not nowait:
return self.wait(allowed_methods=[