NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1853 most downloaded on PyPI
AMQP 1.0 Client Library for Python
Last release 2 years ago
no release in 18 months
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 46 of 46 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
57 releases · first in 2018
Updated OpenSSL dependency to 3.0 LTS
Incorporate fixes in to vendored uamqp-c code to use safe math
One column per quarter.
Incorporate fixes from PR to use safe math in messages.
Incorporate fixes from Azure/azure-uamqp-c#447
Fixes for CVE-2024-21646
Update to add wheels for python 3.12
Starting with this release uamqp will not be in active maintenance, as the Event Hubs & Service Bus libraries are now using the python based AMQP libr
Starting with this release uamqp will not be in active maintenance, as the Event Hubs & Service Bus libraries are now using the python based AMQP library.
Updated OpenSSL dependency to 1.1.1t
Wheels from this release forward have been built with manylinux2014.
Wheels from this release forward have been built with manylinux2014.
Updated OpenSSL dependency to 1.1.1q
This will release will be the last with wheels generated with manylinux2010 as it is deprecated.
This will release will be the last with wheels generated with manylinux2010 as it is deprecated.
*Added support for handling duplicate certificates in azure-c-shared-utility dependency by using CERT_STORE_ADD_REPLACE_EXISTING parameter in the CertAddEncodedCertificateToStore function call. (azure-sdk-for-python issue #26034)
This version and all future versions will require Python 3.7+, Python 3.6 is no longer supported.
This version and all future versions will require Python 3.7+, Python 3.6 is no longer supported.
This version and all future versions will require Python 3.7+, Python 3.6 is no longer supported.
Updated OpenSSL dependency to 1.1.1n for wheels of manylinux and macOS.
Fixed bug that resulted in an error when deepcopying BatchMessage objects (azure-sdk-for-python issue #22529).
Added back the support for Python 3.6.
This version and all future versions will require Python 3.7+, Python 2.7 and Python 3.6 are no longer supported.
This version and all future versions will require Python 3.7+, Python 2.7 and Python 3.6 are no longer supported.
SASTokenAuth, JWTTokenAuth, SASTokenAsync, and JWTTokenAsync now takes keyword argument refresh_window to override default token refresh timing in constructors.SendClientAsync might run into infinite loop while sending when it is shutdown unexpectedly.keep_alive_thread of AMQPClient should not keep program from exiting in the case of AMQPClient not being closed properly.This version and all future versions will require Python 3.7+, Python 2.7 and Python 3.6 are no longer supported.
- Added support for Python 3.10.
Fixed memory leak in win32 socketio and tlsio (azure-sdk-for-python issue #19777).
Fixed bug that JWTTokenAuth and JWTTokenAsync do not initialize token for token types other than b'jwt'.
creation_time, absolute_expiry_time and group_sequence on MessageProperties should be compatible with integer types on Python 2.7.This version and all future versions will require Python 2.7 or Python 3.6+, Python 3.5 is no longer supported.
This version and all future versions will require Python 2.7 or Python 3.6+, Python 3.5 is no longer supported.
This version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.
This version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.
uamqp.MessageBodyType to represent the body type of an amqp message, including:
Data: The body consists of one or more data sections and each section contains opaque binary data.Sequence: The body consists of one or more sequence sections and each section contains an arbitrary number of structured data elements.Value: The body consists of one amqp-value section and the section contains a single AMQP value.uamqp.Message:
body_type which takes uamqp.MessageBodyType to specify the body type of an amqp message.footer which takes a dict to set the footer of an amqp message.delivery_annotations which takes a dict to set the delivery annotations of an amqp message.uamqp.Message.Added desired-capabilities for SendClient(Async) and MessageSender(Async) as part of the AMQP protocol.
SendClient(Async) and MessageSender(Async) as part of the AMQP protocol.Updated Azure uAMQP C and Azure C Shared Utility dependencies.
Fixed bug in accessing MessageProperties.user_id triggering segmentation fault when the underlying C bytes are NULL.
MessageProperties.user_id triggering segmentation fault when the underlying C bytes are NULL.MessageProperties.user_id being limited to 8 bytes.ReceiveClient and ReceiveClientAsync receive messages during connection establishment.Updated cython dependency to 0.29.21.
Updated tlsio_openssl module to send SNI when establishing tls connection (Thanks to milope).
Message.footer and Message.delivery_annotation were not encoded into the outgoing payload.Added parameter shutdown_after_timeout to ReceiveClient and ReceiveClientAsync which gives control over whether to shutdown receiver after timeout.
shutdown_after_timeout to ReceiveClient and ReceiveClientAsync which gives control over whether to shutdown receiver after timeout.Added method MessageReceiver.reset_link_credit which is responsible for resetting current available link credit on the receiver link and send update t
MessageReceiver.reset_link_credit which is responsible for resetting current available link credit on the receiver link and send update to the sender.Fix to initialize delivery_count header at 0 instead of None (azure-sdk-for-python issue #9708)
Fixed bug in setting certificate of tlsio on MacOS (azure-sdk-for-python issue #7201).
Fixed seg fault in tearing down a failed link with unsent pending messages.
Fixed garbage collection of C objects to prevent crashing on uncontrolled shutdown.
Fixed bug in calculating send timeout.
Fixed bug in dropping received messages at the moment when the connection just started working.
ReceiveClient(Async) and MessageReceiver(Async) as part of the AMQP protocol.Message (azure-sdk-for-python issue #7336).work to MessageReceiver and work_async to MessageReceiverAsync responsible for updating link status.Made bug fix in asyncio.get_event_loop backwards-compatible for now by just printing a warning rather than raising an error. In the next major version
Updated the implementation of update_token() in JWTTokenAuth and JWTTokenAsync (issue #80).
update_token() in JWTTokenAuth and JWTTokenAsync (issue #80).Fixed bug in batched messages missing application_properties (azure-event-hubs-python issue #97).
JWTTokenAuth and JWTTokenAsync to support OAuth.…and ReceiveClient._message_receiver are now deprecated).
Support for Python 2.7
TimeoutError is raised in Python 3.x, this will be replaced with a new ~uamqp.errors.ClientTimeout exception in Python 2.7.str object will be treated as bytes in Python 3 and a Python 2 unicode object will be treated like a Python 3 str.AMQP encoding of an integer type will now automatically failover into a Long type or a double type if the value is too large.
Improved support for promptly detecting invalid ATTACH handles and raising the appropriate error.
Added types for AMQPDescribed, AMQPInt and AMQPuInt for explicit handling of int and unsigned int encoding.
Added new error errors.AMQPClientShutdown as a wrapper for KeyboardInterrupt to better handle interrupt handling.
Added better handling of keyboard interrupts during C callbacks to better facilitate clean client shutdown.
Added additional handling of keyboard interrupt at the C level to clean up annoying warnings.
Added classmethod Message.decode_from_bytes to create a message from AMQP wire-encoded data.
Added Message.encode_message method to retrieve the AMQP wire-encoded byte representation of the current message.
Fixed behaviour of Message.get_message_encoded_size() to return accurate size.
Added new optional callback argument to client.mgmt_request to allow for custom handling of different status codes.
Added new client methods auth_complete() and client_ready() to allow for more fine-tuned monitoring or the client opening stages.
Client message handler is now a public attribute client.message_handler (SendClient._message_sender and ReceiveClient._message_receiver are now deprecated).
Added automatic encoding of datetime.datetime objects into AMQP timestamp.
Better support for Source filters with optional descriptor argument in Source.set_filter() and new Source.get_filter() method.
Fixed Session settings not being passed to CBS session.
Added support for a callback on receipt on a Link ATTACH frame. Can be supplied to a client through the on_attach keyword argument.
Removed unsued message.SequenceBody class.
Exposed BatchMessage.size_offset property for batch size customization.
Support for Python 2.7 (>_<)/
- Where ever a [TimeoutError]{.title-ref} is raised in Python 3.x, this will be replaced with a new ~uamqp.errors.ClientTimeout exception in Python 2.7.
- A Python 2 [str]{.title-ref} object will be treated as [bytes]{.title-ref} in Python 3 and a Python 2 [unicode]{.title-ref} object will be treated like a Python 3 [str]{.title-ref}.
- Added uamqp.compat module for handling Py 2 vs 3 imports and types (PR#46, Thanks to maxkrivich).
AMQP encoding of an integer type will now automatically failover into a Long type or a double type if the value is too large.
Improved support for promptly detecting invalid ATTACH handles and raising the appropriate error.
Added types for AMQPDescribed, AMQPInt and AMQPuInt for explicit handling of int and unsigned int encoding.
Added new error [errors.AMQPClientShutdown]{.title-ref} as a wrapper for [KeyboardInterrupt]{.title-ref} to better handle interrupt handling.
Added better handling of keyboard interrupts during C callbacks to better facilitate clean client shutdown.
Added additional handling of keyboard interrupt at the C level to clean up annoying warnings.
Added classmethod [Message.decode_from_bytes]{.title-ref} to create a message from AMQP wire-encoded data.
Added [Message.encode_message]{.title-ref} method to retrieve the AMQP wire-encoded byte representation of the current message.
Fixed behaviour of [Message.get_message_encoded_size()]{.title-ref} to return accurate size.
Added new optional [callback]{.title-ref} argument to [client.mgmt_request]{.title-ref} to allow for custom handling of different status codes.
Added new client methods [auth_complete()]{.title-ref} and [client_ready()]{.title-ref} to allow for more fine-tuned monitoring or the client opening stages.
Client message handler is now a public attribute [client.message_handler]{.title-ref} ([SendClient._message_sender]{.title-ref} and [ReceiveClient._message_receiver]{.title-ref} are now deprecated).
Added automatic encoding of [datetime.datetime]{.title-ref} objects into AMQP timestamp.
Better support for Source filters with optional [descriptor]{.title-ref} argument in [Source.set_filter()]{.title-ref} and new [Source.get_filter()]{.title-ref} method.
Fixed Session settings not being passed to CBS session.
Added support for a callback on receipt on a Link ATTACH frame. Can be supplied to a client through the [on_attach]{.title-ref} keyword argument.
Removed unsued message.SequenceBody class.
Exposed BatchMessage.size_offset property for batch size customization.
…and ReceiveClient._message_receiver are now deprecated).
In addition to the updates in RC1:
Support for Python 2.7:
AMQP encoding of an integer type will now automatically failover into a Long type or a double type if the value is too large.
Improved support for promptly detecting invalid ATTACH handles and raising the appropriate error.
Added types for AMQPInt and AMQPuInt for explicit handling of int and unsigned int encoding.
Added classmethod Message.decode_from_bytes to create a message from AMQP wire-encoded data.
Added Message.encode_message method to retrieve the AMQP wire-encoded byte representation of the current message.
Fixed behaviour of Message.get_message_encoded_size() to return accurate size.
Added new optional callback argument to client.mgmt_request to allow for custom handling of different status codes.
Added new client methods auth_complete() and client_ready() to allow for more fine-tuned monitoring or the client opening stages.
Client message handler is now a public attribute client.message_handler (SendClient._message_sender and ReceiveClient._message_receiver are now deprecated).
Added automatic encoding of datetime.datetime objects into AMQP timestamp.
Where ever a TimeoutError is raised in Python 3.x, this will be replaced with a new ClientTimeout exception in Python 2.7.
Support for Python 2.7
TimeoutError is raised in Python 3.x, this will be replaced with a new ClientTimeout exception in Python 2.7.str object will be treated as bytes in Python 3 and a Python 2 unicode object will be treated like a Python 3 str.Added new error AMQPClientShutdown as a wrapper for KeyboardInterrupt to better handle interrupt handling.
Added better handling of keyboard interrupts during C callbacks to better facilitate clean client shutdown.
Added additional handling of keyboard interrupt at the C level to clean up annoying warnings.
Reduced CPU load during idle receive.
Fixed additional bugs in setting MessageProperties as string or bytes.
Bug fix release to address some reported issues:
Bug fix release to address some reported issues:
uamqp.send_message, which now returns a list of uamqp.constants.MessageState to indicate the success of each message sent.API is now stable! No breaking changes in this release but a few behavioural changes:
API is now stable! No breaking changes in this release but a few behavioural changes:
When a SendClient or SendClientAsync is shutdown, any remaining pending messages (that is messages in the states WaitingToBeSent and WaitingForSendAck) will no longer be cleared, but can be retrieved from a new attribute SendClient.pending_messages in order to be re-processed as needed.
The function SendClient.queue_message now allows for queueing multiple messages at once by simply passing in additional message instances:
An authentication object will now raise a ValueError if one attempts to use it for more than one connection.
Renamed internal _async module to non-private async_ops to allow for docs generation.
Reformatted logging for better performance.
Added additional logging.
API settled.
Behaviour change When a SendClient or SendClientAsync is shutdown, any remaining pending messages (that is messages in the states [WaitingToBeSent]{.title-ref} and [WaitingForSendAck]{.title-ref}) will no longer be cleared, but can be retrieved from a new attribute [SendClient.pending_messages]{.title-ref} in order to be re-processed as needed.
Behaviour change The function [SendClient.queue_message]{.title-ref} now allows for queueing multiple messages at once by simply passing in additional message instances:
- [send_client.queue_message(my_message)]{.title-ref}
- [send_client.queue_message(message_1, message_2, message_3)]{.title-ref}
- [send_client.queue_message(*my_message_list)]{.title-ref}
An authentication object will now raise a [ValueError]{.title-ref} if one attempts to use it for more than one connection.
Renamed internal [_async]{.title-ref} module to non-private [async_ops]{.title-ref} to allow for docs generation.
Reformatted logging for better performance.
Added additional logging.
Some stability improvements in the bindings.
Some stability improvements in the bindings.
Some internal breaking changes to the MessageSender/MessageReceiver classes and their async equivalents. New features:
Some internal breaking changes to the MessageSender/MessageReceiver classes and their async equivalents. New features:
For all changes, please see the release notes.
Breaking change [MessageSender.send_async]{.title-ref} has been renamed to [MessageSender.send]{.title-ref}, and [MessageSenderAsync.send_async]{.title-ref} is now a coroutine.
Breaking change Removed [detach_received]{.title-ref} callback argument from MessageSender, MessageReceiver, MessageSenderAsync, and MessageReceiverAsync in favour of new [error_policy]{.title-ref} argument.
Added ErrorPolicy class to determine how the client should respond to both generic AMQP errors and custom or vendor-specific errors. A default policy will be used, but a custom policy can be added to any client by using a new [error_policy]{.title-ref} argument. Value must be either an instance or subclass of ErrorPolicy.
- The [error_policy]{.title-ref} argument has also been added to MessageSender, MessageReceiver, Connection, and their async counterparts to allow for handling of link DETACH and connection CLOSE events.
- The error policy passed to a SendClient determines the number of message send retry attempts. This replaces the previous [constants.MESSAGE_SEND_RETRIES]{.title-ref} value which is now deprecated.
- Added new ErrorAction object to determine how a client should respond to an error. It has three properties: [retry]{.title-ref} (a boolean to determine whether the error is retryable), [backoff]{.title-ref} (an integer to determine how long the client should wait before retrying, default is 0) and [increment_retries]{.title-ref} (a boolean to determine whether the error should count against the maximum retry attempts, default is [True]{.title-ref}). Currently [backoff]{.title-ref} and [increment_retries]{.title-ref} are only considered for message send failures.
- Added [VendorConnectionClose]{.title-ref} and [VendorLinkDetach]{.title-ref} exceptions for non-standard (unrecognized) connection/link errors.
Added support for HTTP proxy configuration.
Added support for running async clients synchronously.
Added keep-alive support for connection - this is a background thread for a synchronous client, and a background async function for an async client. The keep-alive feature is disabled by default, to enable, set the [keep_alive_interval]{.title-ref} argument on the client to an integer representing the number of seconds between connection pings.
Added support for catching a Connection CLOSE event.
Added support for [Connection.sleep]{.title-ref} and [ConnectionAsync.sleep_async]{.title-ref} to pause the connection.
Added support for surfacing message disposition delivery-state (with error information).
Added [constants.ErrorCodes]{.title-ref} enum to map standard AMQP error conditions. This replaces the previous [constants.ERROR_CONNECTION_REDIRECT]{.title-ref} and [constants.ERROR_LINK_REDIRECT]{.title-ref} which are now both deprecated.
Added new super error [AMQPError]{.title-ref} from which all exceptions inherit.
Added new [MessageHandlerError]{.title-ref} exception, a subclass of [AMQPConnectionError]{.title-ref}, for Senders/Receivers that enter an indeterminate error state.
[MessageException]{.title-ref} is now a subclass of [MessageResponse]{.title-ref}.
Added [ClientMessageError]{.title-ref} exception, a subclass of [MessageException]{.title-ref} for send errors raised client-side.
Catching Link DETACH event will now work regardless of whether service returns delivery-state.
Fixed bug where received messages attempting to settle on a detached link crashed the client.
Fixed bug in amqp C DescribedValue.
Fixed bug where client crashed on deallocating failed management operation.
Removed circular dependency in Python 3.4 with types.py/utils.py
Bug fix release:
None rather than raising ValueError.First stable release! No breaking changes - only bug fixes.
First stable release! No breaking changes - only bug fixes.
For all changes, please see the release notes.
For additional non-breaking changes, please see the release notes.
Breaking changes
async submodule has been renamed and all classes within it can now be imported directly from uamqp or uamqp.authentication.Complete -> SendCompleteFailed -> SendFailedWaitingForAck -> WaitingForSendAckAbandonMessage and DeferMessage exceptions as MessageModified to be in keeping with the AMQP specification.AcceptMessage to MessageAccepted.RejectMessage to MessageRejected which now takes condition and description arguments rather than message.For additional non-breaking changes, please see the release notes.
Breaking change Submodule [async]{.title-ref} has been renamed to the internal [_async]{.title-ref}. All asynchronous classes in the submodule can now be accessed from uamqp or uamqp.authentication directly.
Breaking change Anything returned by a callback supplied to receive messages will now be ignored.
Breaking change Changed message state enum values:
- [Complete -> SendComplete]{.title-ref}
- [Failed -> SendFailed]{.title-ref}
- [WaitingForAck -> WaitingForSendAck]{.title-ref}
Added new message state enum values:
- [ReceivedUnsettled]{.title-ref}
- [ReceivedSettled]{.title-ref}
Breaking change Changes to message settlement exceptions:
- Combined the [AbandonMessage]{.title-ref} and [DeferMessage]{.title-ref} exceptions as [MessageModified]{.title-ref} to be in keeping with the AMQP specification.
- Renamed [AcceptMessage]{.title-ref} to [MessageAccepted]{.title-ref}.
- Renamed [RejectMessage]{.title-ref} to [MessageRejected]{.title-ref} which now takes [condition]{.title-ref} and [description]{.title-ref} arguments rather than [message]{.title-ref}.
Added [errors.LinkDetach]{.title-ref} exception as new subclass of [AMQPConnectionError]{.title-ref} as a wrapped for data in a Link DETACH dispostition.
Added [errors.LinkRedirect]{.title-ref} as a specific subclass of [LinkDetach]{.title-ref} to decode the specific redirect fields of a Link Redirect response.
Added [errors.MessageAlreadySettled]{.title-ref} exception for operations performed on a received message that has already returned a receipt dispostition.
Added [errors.MessageReleased]{.title-ref} exception.
Added [errors.ErrorResponse]{.title-ref} exception.
A received Message can now be explicitly settled through a set of new functions on the message:
- [Message.accept()]{.title-ref}
- [Message.reject(condition:str, description:str)]{.title-ref}
- [Message.release()]{.title-ref}
- [Message.modify(failed:bool, deliverable:bool, annotations:dict)]{.title-ref}
Added explicit [auto_complete]{.title-ref} argument to [ReceiveClient]{.title-ref} and [ReceiveClientAsync]{.title-ref}. If [auto_complete]{.title-ref} is set to [False]{.title-ref} then all messages must be explicitly "accepted" or "rejected" by the user otherwise they will timeout and be released. The default is [True]{.title-ref}, which is the exiting behaviour for each receive mechanism:
- Received messages processed by callback ([ReceiveClient.receive_messages()]{.title-ref}) will be automatically "accepted" if no explicit response has been set on completion of the callback.
- Received messages processed by batch ([ReceiveClient.receive_message_batch()]{.title-ref}) will by automatically "accepted" before being returned to the user.
- Received messages processed by iterator ([ReceiveClient.receive_message_iter()]{.title-ref}) will by automatically "accepted" if no explicit response has been set once the generator is incremented.
Added new methods to clients and connections to allow to redirect to an alternative endpoint when a LinkRedirect exception is raised. The client redirect helper cannot be used for clients that use a shared connection - the clients must be closed before the connection can be redirected. New credentials must be supplied for the new endpoint. The new methods are:
- [uamqp.Connection.redirect(redirect_info, auth)]{.title-ref}
- [uamqp.async.ConnectionAsync.redirect_async(redirect_info, auth)]{.title-ref}
- [uamqp.SendClient.redirect(redirect_info, auth)]{.title-ref}
- [uamqp.ReceiveClient.redirect(redirect_info, auth)]{.title-ref}
- [uamqp.async.SendClientAsync.redirect_async(redirect_info, auth)]{.title-ref}
- [uamqp.async.ReceiveClientAsync.redirect_async(redirect_info, auth)]{.title-ref}
Added [on_detach_received]{.title-ref} argument to [Sender]{.title-ref} and [Receiver]{.title-ref} classes to pass in callback to run on Link DETACH.
Removed automatic char encoding for strings of length 1, and added [types.AMQPChar]{.title-ref} for explicit encoding.
Bumped uAMQP C version to 1.2.5
Bumped Azure C Shared Utility to 1.1.5
Fixed memory leaks in MessageProperties, MessageHeader and message annotations.
Fixed import error in async receiver.
header argument to Message and BatchMessage for setting a MessageHeader.Fixed dynamic cert reference for OpenSSL. Now install ca-certificates on Linux is no longer required.
Fixed memory leak in async receive.
Fixed SSL errors in manylinux wheels.
Installation notes
Added timeouts and better error handling for management requests.
Added management request support.
Installation notes:
Release includes some bug fixes as well as new features.
Release includes some bug fixes as well as new features.
Installation notes:
Source install (i.e. using --no-binary) is currently only available for Linux.
Preview release.
Installation notes:
Your coding agent can read these notes before it upgrades. Set up the MCP server →