Files
hatchet/sdks/python/CHANGELOG.md
Matt Kaye 2f33dd4dbd Feat: Misc. Python improvements + Streaming Improvements (#1846)
* fix: contextvars explicit copy

* feat: fix a ton of ruff errors

* fix: couple more ruff rules

* fix: ignore unhelpful rule

* fix: exception group in newer Python versions for improved handling

* fix: workflow docs

* feat: context docs

* feat: simple task counter

* feat: config for setting max tasks

* feat: graceful exit once worker exceeds max tasks

* fix: optional

* fix: docs

* fix: events docs + gen

* chore: gen

* fix: one more dangling task

* feat: add xdist in ci

* fix: CI

* fix: xdist fails me once again

* fix: fix + extend some tests

* fix: test cleanup

* fix: exception group

* fix: ugh

* feat: changelog

* Add Ruff linter callout to post

* refactor: clean up runner error handling

* feat: improved errors

* fix: lint

* feat: hacky serde impl

* fix: improve serde + formatting

* fix: logging

* fix: lint

* fix: unexpected errors

* fix: naming, ruff

* fix: rm cruft

* Fix: Attempt to fix namespacing issue in event waits (#1885)

* feat: add xdist in ci

* fix: attempt to fix namespacing issue in event waits

* fix: namespaced worker names

* fix: applied namespace to the wrong thing

* fix: rm hack

* drive by: namespacing improvement

* fix: delay

* fix: changelog

* fix: initial log work

* fix: more logging work

* fix: rm print cruft

* feat: use a queue to send logs

* fix: sentinel value to stop the loop

* fix: use the log sender everywhere

* fix: make streaming blocking, remove more thread pools

* feat: changelog

* fix: linting issues

* fix: broken test

* chore: bunch more generated stuff

* fix: changelog

* fix: one more

* fix: mypy

* chore: gen

* Feat: Streaming Improvements (#1886)

* Fix: Filter list improvements (#1899)

* fix: uuid validation

* fix: improve filter filtering

* fix: inner join

* fix: bug in workflow cached prop

* chore: bump

* fix: lint

* chore: changelog

* fix: separate filter queries

* feat: improve filter filtering

* fix: queries and the like

* feat: add xdist in ci

* feat: streaming test + gen

* feat: add index to stream event

* fix: rm langfuse dep

* fix: lf

* chore: gen

* feat: impl index for stream on context

* feat: tweak protos

* feat: extend test

* feat: send event index through queue

* feat: first pass + debug logging

* debug: fixes

* debug: more possible issues

* feat: generate new stream event protos

* feat: first pass at using an alternate exchange for replaying incoming stream events

* fix: exchange create timing

* fix: rm unused protos

* chore: gen

* feat: python cleanup

* fix: revert rabbit changes

* fix: unwind a bunch of cruft

* fix: optional index

* chore: gen python

* fix: event index nil handling

* feat: improve test

* fix: stream impl in sdk

* fix: make test faster

* chore: gen a ton more stuff

* fix: test

* fix: sorting helper

* fix: bug

* fix: one more ordering bug

* feat: add some tests for buffering logic

* feat: hangup test

* feat: test no buffering if no index sent

* fix: regular mutex

* fix: pr feedback

* fix: conflicts
2025-06-25 10:11:01 -04:00

4.4 KiB

Changelog

All notable changes to Hatchet's Python SDK will be documented in this changelog.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[1.13.0] - 2025-06-25

Added

  • Documentation for the Context classes
  • Allows for a worker to be terminated after a certain number of tasks by providing the terminate_worker_after_num_tasks config option

Changed

  • Adds a number of helpful Ruff linting rules
  • DedupeViolationErr is now DedupeViolationError
  • Fixed events documentation to correctly have a skipped run example.
  • Changed default arguments to many methods from mutable defaults like [] to None
  • Changes JSONSerializableMapping from Mapping to dict
  • Handles some potential bugs related to asyncio tasks being garbage collected.
  • Improves exception printing with an ExceptionGroup implementation
  • Fixes a bug with namespacing of user event conditions where the namespace was not respected so the task waiting for it would hang
  • Fixes a memory leak in streaming and logging, and fixes some issues with log capture.

[1.12.3] - 2025-06-25

Changed

  • Fixes a namespacing-related but in the workflow.id property that incorrectly (and inconsistently) returned incorrect IDs for namespaced workflows.

[1.12.2] - 2025-06-17

Changed

  • Fixes a security vulnerability by bumping the protobuf library

[1.12.1] - 2025-06-13

Added

  • Adds corresponding SDK changes from API changes to events (additional parameters to filter events by, additional data returned)

[1.12.0] - 2025-06-06

Added

  • Adds a warning on client init if the SDK version is not compatible with the tenant (engine) version.
  • Adds a default_filters parameter to the Hatchet.workflow and Hatchet.task methods to allow you to declaratively provide a list of filters that will be applied to the workflow by default when events are pushed.
  • Adds get_status and aio_get_status methods to the Runs feature client, which return a workflow run's status by its ID.
  • Adds a update methods to the Filters feature client.

Changed

  • Allows the concurrency parameter to tasks to be a list.
  • Fixes an internal bug with duplicate concurrency expressions being set when using Hatchet.task.
  • Modifies existing datetime handling to use UTC timestamps everywhere.

[1.11.1] - 2025-06-05

Changed

  • Fixes a couple of blocking calls buried in the admin client causing loop blockages on child spawning

[1.11.0] - 2025-05-29

Changed

  • Significant improvements to the OpenTelemetry instrumentor, including:
    • Traceparents are automatically propagated through the metadata now so the client does not need to provide them manually.
    • Added a handful of attributes to the run_workflow, push_event, etc. spans, such as the workflow being run / event being pushed, the metadata, and so on. Ignoring
    • Added tracing for workflow scheduling

[1.10.2] - 2025-05-19

Changed

  • Fixing an issue with the spawn index being set at the workflow_run_id level and not the (workflow_run_id, retry_count) level, causing children to be spawned multiple times on retry.

[1.10.1] - 2025-05-16

Added

  • Adds an otel item to the ClientConfig and a excluded_attributes: list[OTelAttribute] there to allow users to exclude certain attributes from being sent to the OpenTelemetry collector.

[1.10.0] - 2025-05-16

Added

  • The main Hatchet client now has a filters attribute (a Filters client) which wraps basic CRUD operations for managing filters.
  • Events can now be pushed with a priority attribute, which sets the priority of the runs triggered by the event.
  • There are new list and aio_list methods for the Events client, which allow listing events.
  • Workflow runs can now be filtered by triggering_event_external_id, to allow for seeing runs triggered by a specific event.
  • There is now an id property on all Workflow objects (Workflow created by hatchet.workflow and Standalone created by hatchet.task) that returns the ID (UUID) of the workflow.
  • Events can now be pushed with a scope parameter, which is required for using filters to narrow down the filters to consider applying when triggering workflows from the event.

Changed

  • The name parameter to hatchet.task and hatchet.durable_task is now optional. If not provided, the task name will be the same as the function name.