Skip to content

Releases: tibordp/pyncette

v1.1.0

20 Oct 09:55

Choose a tag to compare

Features

  • Added MongoDB backend support (pip install pyncette[mongodb])
    • Uses Motor (async MongoDB driver) for efficient async operations
    • Implements optimistic locking using version-based CAS (Compare-And-Swap)
    • Compatible with MongoDB 4.2+
    • Supports all Pyncette features including dynamic tasks and partitioning
  • Added force parameter to schedule_task to control behavior when updating dynamic task instances
    • Default (force=False): Fails with TaskLockedException if task is locked, preserves sooner execution time to prevent schedule postponement
    • With force=True: Unconditionally overwrites task state including locks and schedule
  • Added new task state query API for inspecting both static and dynamic tasks
    • get_task(task, instance_name=None) - Query the state of any task (static or dynamic)
      • For static tasks: get_task(my_task)
      • For dynamic tasks: get_task(template, "instance") or get_task(concrete_instance)
    • list_tasks(parent_task, limit=None, continuation_token=None) - List all instances of a dynamic task with pagination
    • Returns TaskState objects containing task, scheduled_at, locked_until, and locked_by
    • Implemented across all backends: PostgreSQL, MySQL, SQLite, DynamoDB, Redis, MongoDB

Bug Fixes

  • Fixed race condition in schedule_task where calling it while a task was executing could clear locks and cause duplicate execution
  • Fixed schedule starvation issue where repeated schedule_task calls would indefinitely postpone task execution

Performance Improvements

  • Switched MySQL backend to READ COMMITTED isolation level to eliminate gap lock deadlocks and improve concurrency
  • Optimized Postgres and MySQL register_task to use upsert (INSERT ON CONFLICT/INSERT ON DUPLICATE KEY UPDATE) for force mode

API Changes

  • Added TaskLockedException exception type for clearer error handling when tasks are locked
  • Updated register_task across all backends to accept force parameter
  • Added new get_task_state() method to Repository interface for querying individual task state
  • Added new list_task_states() method to Repository interface for paginated listing of dynamic task instances
  • Added new public API methods to PyncetteContext:
    • get_task(task, instance_name=None) - Query state of static or dynamic tasks
    • list_tasks(parent_task, limit=None, continuation_token=None) - List dynamic task instances with pagination
  • Added new model classes: TaskState (task state snapshot) and ListTasksResponse (paginated results)

v1.0.0

17 Oct 22:57

Choose a tag to compare

After 6 years since the initial release in 2019, Pyncette has reached 1.0.0.

Breaking Changes

  • Dropped Python 3.8 support - Minimum Python version is now 3.9

Packaging and Tooling

  • Migrated from setup.py to PEP 621 pyproject.toml with hatchling
  • Replaced tox with uv for dependency management and testing
  • Migrated documentation from Sphinx/RST to MkDocs Material/Markdown
  • Replaced mypy with ty for type checking
  • Consolidated linting to Ruff (replacing black, isort, pyupgrade)
  • Documentation now hosted on GitHub Pages at https://tibordp.github.io/pyncette/

Bug Fixes

  • Fixed Python 3.14 compatibility: Standardized SQLite parameter binding to use named parameters
  • Fixed lease comparison bug in poll_task (UUID vs string type mismatch)
  • Fixed optimistic locking in poll_dynamic_task that wasn't working due to incorrect parameter binding

v0.11.0

25 Nov 22:59

Choose a tag to compare

  • Add support for Python 3.12 and Python 3.13
  • Switch primary Python version for CI to 3.12
  • Linter fixes

v0.10.1

09 May 10:15

Choose a tag to compare

  • Include missing lua files in the built wheel

v0.10.0

08 May 22:07

Choose a tag to compare

  • Drop support for Python 3.7
  • Add support for Python 3.11
  • Modernize Python package structure and linters
  • Fix a few bugs and type annotations

v0.9.0

17 Oct 18:41

Choose a tag to compare

  • Upgrade dependencies
  • Experimental Python 3.10 support

v0.8.1

08 Apr 16:41

Choose a tag to compare

  • Improve performance for calculation of the next execution time
  • Add ability for repositories to pass a pagination token
  • Add add_to_context() to inject static data to context
  • Clean up documentation and add additional examples

v0.8.0

05 Apr 21:05

Choose a tag to compare

v0.7.0

31 Mar 01:31

Choose a tag to compare

  • Added support for automatic and cooperative lease heartbeating
  • PostgreSQL backend can now skip automatic table creation
  • Improved signal handling
  • CI: Add Codecov integration
  • Devenv: Run integration tests in Docker Compose

v0.6.3

25 Feb 16:40

Choose a tag to compare

  • Add Python 3.9 support