Pystorm

Latest version: v3.1.4

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

Scan your dependencies

Page 2 of 3

3.0.2

This bugfix release fixes an issue where trying to `emit` a `namedtuple` would cause Storm workers to crash with a JSON serialization exception. (PR 37)

3.0.1

This release fixes a few minor issues with pystorm 3.0.0 (all fixed in PR 36).
- Serialization exceptions are now caught and logged when sending messages, so components won't crash when they try to send malformed messages.
- Use `Component.logger` if its set when `Component.send_message` is passed something that isn't a `dict`.
- The `pystorm` logger's level now get's set to `pystorm.log.level` instead of just individual components' logging levels. This will ensure that module-level pystorm messages are not missed.

3.0.0

This release changes a couples defaults to be more sensible, which is the only reason it is considered backward-incompatible. Otherwise, it has a couple handy logging-related features.

:warning: API Breaking Changes :warning:
- `need_task_ids` defaults to `False` instead of `True` in all `emit()` method calls. If you were previously storing the task IDs that your tuples were emitted to (which is pretty rare), then you must pass `need_task_ids=True` in your `emit()` calls. This should provide a little speed boost to most users, because we do not need to wait on a return message from Storm for every emitted tuple.
- Instead of having `pystorm.log.level` influence the root logger's level, only your component (and its `StormHandler` if you haven't set `pystorm.log.path`)'s levels will be set.
- When `pystorm.log.path` is not set, pystorm will no longer issue warning about how you should set it; instead, it will automatically set up a `StormHandler` and log everything directly to your Storm logs. This is really handy as in Storm 1.0 there's support through the UI for searching logs.

Features
- Added support for custom log filenames via `pystorm.log.file` (PR 25 — thanks kalmanolah)
- Added support for custom log format strings via `pystorm.log.format` (PR 33)
- Automatically log to Storm when `pystorm.log.path` is not set (PR 32)
- `__version__` is directly available under the `pystorm` namespace instead of just in `pystorm.version`
- `need_task_ids` defaults to `False`, which should provide a speed boost, as discussed above (Issue 29, PR 31)

Fixes
- Add missing `_reader_lock` in `msgpack_serializer`. This could have caused task IDs to not match with emits if using `need_task_ids`, multithreading, and the msgpack serializer. (PR 28)
- Simplified `emit` logic, so that we only request `_reader_lock` if `need_task_ids` is `True` (PR 23)
- Added missing `TicklessBatchingBolt` to `__all__` in `__init__.py`.

2.0.1

This is a bugfix release that fixes an issue where an `IOError` was being raised instead of a `StormWentAwayError` when the pipe to Storm breaks during `send_message`. (Issue 20).

2.0.0

- Remove deprecated `Spout.emit_many` method that should have been removed ages ago. That's it. It's just a backward-incompatible change.

1.1.0

Enhancements
- `Tuple.values` is now a `namedtuple` so fields can be accessed by name in Storm 0.10.0+ (Issue 9, PR 14)
- Added support for sending/receiving to Storm via msgpack instead of JSON. Code based on Pyleus's. (Issue 5, PR 1)
- Added `exit_on_exception` flag to `Component` class, so you can disable calling `sys.exit` when there's an exception (while still failing the tuple). (Issue 16, PR 17)
- Now `StormWentAwayErrors` are only logged at the `INFO` level before `sys.exit` is called. This is to prevent sentry fatigue. (Issue 12, PR 13)

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.