temporalio / temporalio/samples-python

[Bug] Update Pydantic converter example to reflect `with_child_unrestricted` changes

Open
#126 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
367
Forks
121
Avg merge
3d 20h
Merged PRs (30d)
11

Description

What are you really trying to do?

I want to use Pydantic and datetime objects as input/outputs/signals/queries to workflows and activities.

Describe the bug

The recommended reference example for the Pydantic converter creates a new sandbox to work around a bug in Pydantic.

There is a TODO in the code below:

https://github.com/temporalio/samples-python/blob/main/pydantic_converter/worker.py

that says:

TODO(cretz): Use with_child_unrestricted when https://github.com/temporalio/sdk-python/issues/254 is fixed and released

The issue in question has now been merged but the example hasn't been updated.

Minimal Reproduction

https://github.com/temporalio/samples-python/blob/main/pydantic_converter/worker.py

Environment/Versions

n/a

Additional context

n/a

Thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open pydantic_converter/worker.py and read the TODO about using with_child_unrestricted after sdk-python issue 254 was fixed and released. Update the reference example to reflect that change, then verify the Pydantic converter example no longer relies on the workaround described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.