Skip to content
Snippets Groups Projects
Commit 83d88972 authored by Gavin M. Roy's avatar Gavin M. Roy
Browse files

Changes to support pamqp 1.6.0

- Update how message property data types are retrieved
- Fix tests relying on .__dict__
parent 151568c1
No related branches found
No related tags found
No related merge requests found
Version History
---------------
- 0.24.0 - released *2014-12-12*
- Update to reflect changes in pamqp 1.6.0
- Update how message property data types are retrieved
- Fix tests relying on .__dict__
- 0.23.0 - released *2014-11-5*
- Fix a bug where message body length was being assigned to the content header prior to converting the unicode string to bytes (#49)
- Add a new rabbitpy.utils.maybe_utf8_encode method for handling strings that may or may not contain unicode (#49)
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
rabbitpy, a pythonic RabbitMQ client
 
"""
__version__ = '0.23.0'
__version__ = '0.24.0'
version = __version__
import logging
 
Loading
Loading
Loading
Loading
@@ -346,7 +346,7 @@ class Message(base.AMQPClass):
def _coerce_properties(self):
"""Force properties to be set to the correct data type"""
for key, value in self.properties.items():
_type = getattr(specification.Basic.Properties, key)
_type = specification.Basic.Properties.type(key)
if _type == 'shortstr':
if not utils.is_string(value):
LOGGER.warning('Coercing property %s to bytes', key)
Loading
Loading
@@ -370,7 +370,7 @@ class Message(base.AMQPClass):
 
"""
return [key for key in self.properties
if key not in specification.Basic.Properties.attributes]
if key not in specification.Basic.Properties.attributes()]
 
@property
def _properties(self):
Loading
Loading
pamqp>=1.5.0,<2.0
pamqp>=1.6.0,<2.0
coverage
nose
mock
Loading
Loading
[wheel]
[bdist_wheel]
universal=1
Loading
Loading
@@ -26,7 +26,7 @@ classifiers = ['Development Status :: 5 - Production/Stable',
'Topic :: Software Development :: Libraries']
 
setuptools.setup(name='rabbitpy',
version='0.23.0',
version='0.24.0',
description=desc,
long_description=open('README.rst').read(),
author='Gavin M. Roy',
Loading
Loading
@@ -35,7 +35,7 @@ setuptools.setup(name='rabbitpy',
packages=['rabbitpy'],
package_data={'': ['LICENSE', 'README.md']},
include_package_data=True,
install_requires=['pamqp>=1.5.0,<2.0'],
install_requires=['pamqp>=1.6.0,<2.0'],
tests_require=tests_require,
test_suite='nose.collector',
license=open('LICENSE').read(),
Loading
Loading
Loading
Loading
@@ -208,7 +208,7 @@ class QueueDeclareTests(unittest.TestCase):
'passive': False,
'queue': '',
'ticket': 0}
self.assertDictEqual(obj._declare(False).__dict__, expectation)
self.assertDictEqual(dict(obj._declare(False)), expectation)
 
def test_default_declare_passive(self):
obj = amqp_queue.Queue(self.chan)
Loading
Loading
@@ -220,7 +220,7 @@ class QueueDeclareTests(unittest.TestCase):
'passive': True,
'queue': '',
'ticket': 0}
self.assertDictEqual(obj._declare(True).__dict__, expectation)
self.assertDictEqual(dict(obj._declare(True)), expectation)
 
def test_queue_name(self):
obj = amqp_queue.Queue(self.chan, 'my-queue')
Loading
Loading
@@ -232,7 +232,7 @@ class QueueDeclareTests(unittest.TestCase):
'passive': False,
'queue': 'my-queue',
'ticket': 0}
self.assertDictEqual(obj._declare(False).__dict__, expectation)
self.assertDictEqual(dict(obj._declare(False)), expectation)
 
def test_non_defaults(self):
obj = amqp_queue.Queue(self.chan, 'my-queue', False, True, True,
Loading
Loading
@@ -249,7 +249,7 @@ class QueueDeclareTests(unittest.TestCase):
'passive': False,
'queue': 'my-queue',
'ticket': 0}
self.assertDictEqual(obj._declare(False).__dict__, expectation)
self.assertDictEqual(dict(obj._declare(False)), expectation)
 
 
class QueueAssignmentTests(unittest.TestCase):
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment