Repository navigation
Releases
Releases · denismaciel/spater
v0.6.1
Immutable
release. Only release title and notes can be modified.
Full Changelog: v0.6.0...v0.6.1
v0.6.0
Immutable
release. Only release title and notes can be modified.
Full Changelog: v0.5.1...v0.6.0
v0.5.1
Immutable
release. Only release title and notes can be modified.
Full Changelog: v0.5.0...v0.5.1
v0.4.5
Immutable
release. Only release title and notes can be modified.
Full Changelog: v0.4.4...v0.4.5
v0.4.3
v0.4.2
v0.4.0
pyasynq 0.3.0
Fixes
This release fixes the task-ownership, recovery and option-handling bugs found in review. Each one has a regression test in tests/test_regressions.py.
- Execution IDs. The engine now tracks each attempt by an ID it issues, rather than by task ID. Tasks with the same ID in different queues no longer swap results, and a cancel timer or callback left over from an earlier attempt can no longer finalize the retry.
- Handlers that raise
CancelledErrorthemselves release their concurrency slot and are retried or archived like any other failure. - Non-failure errors (
RateLimited, oris_failurereturning False) are retried without using upmax_retry. - Groups.
- Failed aggregations are put back into their group and the group is re-registered, so they are aggregated again.
- Delayed tasks with a group join that group when they're due.
- Grouped tasks that come back from retry are aggregated again.
delete_queuenow takes completed, grouped and aggregating tasks into account, andforce=Trueremoves them.- A task-ID conflict on a unique enqueue no longer leaves its uniqueness lock behind.
- Sub-second
timeoutandretentionnow raiseValueErrorinstead of silently becoming "unset", and fractional seconds round up. - A deleted queue reappears when a client enqueues into it again.
- Smaller fixes:
- Handler parameters declared positional-only now work.
- An empty
b""result staysb""instead of becomingNone. - Workers no longer form a reference cycle that Python's garbage collector can't reclaim.
- Redis timeouts. The client now allows 5s to connect and 10s per response; the redis-rs default response timeout is 500ms.
Packaging
- Wheels: manylinux (x86_64, aarch64), musllinux (x86_64) and macOS (x86_64, arm64), all abi3 for CPython ≥ 3.10.
- CI runs lint (clippy, rustfmt, ruff,
mypy --strict, stubtest) and the full test suite, including the Go interop tests.
pyasynq 0.2.0
Typed SDK
Type checkers now see the whole API. The payload and result types come from each handler's signature.
@app.task("email:send", queue="critical")
async def send(email: Email, ctx: TaskContext) -> dict: ...
send # TaskDef[Email, dict]
info = send.enqueue(Email("a@b.c")) # TaskInfo[dict]
await send.wait_result(info) # dict
send.enqueue("a@b.c") # error: expected Email
send.enqueue(email, proces_in=60) # error: unknown option- Added stubs for the Rust extension (
_core.pyi) and apy.typedmarker.TaskInfo,Inspector,Clientand the other Rust-backed classes are now fully typed, andstubtestchecks the stubs against the compiled module. TaskDef[P, R]is generic over the payload and the result. Both@app.taskand@app.task("name", ...)keep these types.- Enqueue and task options are typed (
EnqueueOptionsandTaskOptions), so misspelled or mistyped options are reported. - Task states are
Literaltypes, for example ininspector.list_tasks(queue, "retry"). TaskInfo[R]can be subscripted at runtime.make lintnow runsmypy --strictover the package and a type-assertion test file.
This release changes no runtime behavior.
Install
Download the wheel below (Linux x86_64, CPython ≥ 3.10). On other platforms, build from the source distribution, which needs a Rust toolchain:
pip install pyasynq-0.2.0-cp310-abi3-linux_x86_64.whl