Tomodachi

Latest version: v0.27.0

Safety actively analyzes 631355 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 24

0.24.3

- Fixes an issue in the internal retry logic when using `aws_sns_sqs_publish` if calls to the AWS API `SNS.Publish` would intermittently respond with 408 response without any body, which previously would've resulted in a `AWSSNSSQSException("Missing MessageId in response")` immediately without retries.

This was previously attempted to be fixed in the 0.23.0 release, but instead fell through to become an exception with the `"Missing MessageId in response"` message instead.

The publish function will now catch exceptions from `botocore` of type `ResponseParserError` to which `botocore` has added that `"Further retries may succeed"`. `tomodachi` will retry such `SNS.Publish` calls up to 3 times and if after all retries the library will reraise the exception from `botocore`.

It seems that `botocore` does not automatically retry such errors itself.

- Similar to the above, the same kind of retries will now also be done during AWS API calls for `SQS.DeleteMessage`, where the `botocore.parser.QueryParser` would raise an `ResponseParserError` exception on 408 responses without body.

0.24.2

- Fixes typing syntax for compatibility with Python 3.8 and Python 3.9 to solve the incompatibility for Python 3.8 and Python 3.9 introduced in the the 0.24.1 release.
- Fixes an issue with an AWS SQS queue's message retention period attribute using an incompatible default value for FIFO queues.
- Support for `aiobotocore` 2.5.x releases.
- README.rst fixes to conform with RST format. (github: **navid-agz**)

0.24.1

- Adds max number of messages that the service will consume when using AWS SNS+SQS handlers configurable. (github: **navid-agz**)
- Changed default retention period of dead-letter-queues on AWS SNS+SQS. (github: **PabloAJomer**)

0.24.0

- `cchardet` is no longer a direct dependency to `tomodachi` on Python 3.10 and Python 3.11. If you want to use it, you must install it separately, which may require additional build tools when installing on Python 3.10+.
- Updates to the internal `tomodachi.envelope.ProtobufBase` envelope to now also support protobuf Python bindings versioned \>=4.0.0, when running with the (new default) `PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=upb` as `upb` slightly differs in representation of a Message type in relation to `cpp` and `python` implementations.
- Python 3.11 added to test matrix and trove classifiers to officially claim support.

0.23.0

- Properly handles `aiobotocore` client using an async contextmanager. Drops support for `aiobotocore` versions prior 1.3.0, but will now supporting newer versions. (github: **drestrepom**)

- Fixes an issue to now retry calls where AWS SNS intermittently responds with 408 responses without any body, which trips up `botocore.parser.QueryParser`. (github: **technomunk**)

- Refactored options used for AWS SNS+SQS, HTTP, AMQP and the Watcher functionality. Options set on the service class should now be defined as a `tomodachi.Options` object, which provides type hints and much nicer path traversal of the class.

Only the specified typed values for `options` will now be allowed to be set. Setting a non-defined option will raise an `AttributeError` exception on service start.

The previous `dict` based approach is still supported, but will be removed in a future version.

- Dropped support for Python 3.7.

0.22.3

- Support for assigning values to AWS SQS queue attributes value `VisibilityTimeout` and `RedrivePolicy` that is used to assign a queue to use a dead-letter queue after a number of failed attempts to consume a message. By default no changes will be done to the existing queue attributes and a change will only be triggered by assigning values to the `visibility_timeout` or both of `dead_letter_queue_name` + `max_receive_count` keyword arguments.

python
tomodachi.aws_sns_sqs(
topic=None,
competing=True,
queue_name=None,
filter_policy=FILTER_POLICY_DEFAULT,
visibility_timeout=VISIBILITY_TIMEOUT_DEFAULT, affects MessageVisibility
dead_letter_queue_name=DEAD_LETTER_QUEUE_DEFAULT, affects RedrivePolicy
max_receive_count=MAX_RECEIVE_COUNT_DEFAULT, affects RedrivePolicy
**kwargs,
)


- Fixes a bug where SQS messages wouldn't get deleted from the queue if a middleware function catches an exception without reraising it. This is because the `delete_message` is not called from within `routine_func` (due to the exception breaking normal control flow), but the message deletion from middleware bubble is also skipped, as no exception is propagated from it. (github: **technomunk**)

- Adds basic support for FIFO queues & topics on AWS SQS queues managed by a `tomodachi` service decorated function, which can be used where one needs guaranteed ordering of the consumed messages. (github: **kjagiello**)

- Updates to the internal `tomodachi.envelope.ProtobufBase` envelope to now also support newer versions of protobuf.

- Added documentation to describe the "magic" functions that hooks into the service lifecycle; `_start_service`, `_started_service`, `_stopping_service`, `_stop_service`.

Page 3 of 24

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.