Skip to content

Commit 4d586c5

Browse files
#372: make avro a core dependency, not optional
avro>=1.12 moved from [project.optional-dependencies] to dependencies. With Avro as the default codec, the SDK is non-functional without it. Docstring updated: avro is default, json is decode-only.
1 parent fde2752 commit 4d586c5

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,10 @@ classifiers = [
3232
]
3333
dependencies = [
3434
"httpx>=0.27",
35+
"avro>=1.12,<2",
3536
]
3637

3738
[project.optional-dependencies]
38-
avro = [
39-
"avro>=1.12,<2",
40-
]
4139
dev = [
4240
"avro>=1.12,<2",
4341
"pytest>=8.0",

src/durable_workflow/serializer.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66
77
Supported codecs:
88
9-
- ``"json"`` — the blob is a UTF-8 JSON document. Default and always
10-
available.
9+
- ``"json"`` — the blob is a UTF-8 JSON document. Supported for decoding
10+
existing data only, not used for new workflows.
1111
- ``"avro"`` — the blob is a base64-encoded Avro generic-wrapper payload
12-
(see :mod:`durable_workflow._avro`). Requires the optional ``avro``
13-
extra: ``pip install 'durable-workflow[avro]'``.
12+
(see :mod:`durable_workflow._avro`). Default for all new v2 workflows.
1413
"""
1514
from __future__ import annotations
1615

0 commit comments

Comments
 (0)