Skip to content

fix(datashare python): pydantic deserialization#56

Open
ClemDoum wants to merge 3 commits into
mainfrom
fix(datashare-python)/pydantic-deserialization
Open

fix(datashare python): pydantic deserialization#56
ClemDoum wants to merge 3 commits into
mainfrom
fix(datashare-python)/pydantic-deserialization

Conversation

@ClemDoum

Copy link
Copy Markdown
Contributor

⚠️ breaks datashare-python's API: activity_defn

Descriptions

Addresses #47 and refactor activity definition using temporal's interceptor builtin mechanism rather than chaining decorators.

By default temporal bypasses deserialization using the data converter when task argument length differ from activity function arg length.
This is typically the case when we introduce def my_activity_fn(arg_1: PydanticBaseModel, *, progress: ProgressRateHandler | None = None) since the progress is injected and not passed as activity argument by the user.

This was the source of many failure to deserialize pydantic objects as BaseModel but as dict instead

Changes

datashare-python

Fixed

  • Pydantic argument deserialization due support of positional only args in temporal

Changed

  • remove decorator chaining inside activity_defn in favor of temporal interceptor mechanism

@ClemDoum ClemDoum requested a review from winsomeglint June 22, 2026 10:30
@ClemDoum ClemDoum self-assigned this Jun 22, 2026
@ClemDoum ClemDoum marked this pull request as ready for review June 22, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant