mirror of https://github.com/celery/kombu.git
buffer() was removed in Python 3 so use bytes (#1218)
* buffer() was removed in Python 3 so use memoryview https://docs.python.org/2.7/library/stdtypes.html#memoryview-type * buffer = bytes on Python 3 * from kombu.five import buffer * buffer --> buffer_t * @patch('buffer_t') in test_qpid.py * @patch('kombu.five.buffer_t') * Use buffer on legacy Python and bytes on Python * Update test_qpid.py
This commit is contained in:
parent
b4581289fa
commit
ed35d9f0a9
|
@ -124,6 +124,10 @@ from kombu.transport import base, virtual
|
||||||
|
|
||||||
logger = get_logger(__name__)
|
logger = get_logger(__name__)
|
||||||
|
|
||||||
|
try:
|
||||||
|
buffer
|
||||||
|
except NameError:
|
||||||
|
buffer = bytes
|
||||||
|
|
||||||
OBJECT_ALREADY_EXISTS_STRING = 'object already exists'
|
OBJECT_ALREADY_EXISTS_STRING = 'object already exists'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue