Skip to content
This repository was archived by the owner on Jun 10, 2026. It is now read-only.

refactor: Use Duration dataclass#108

Closed
ghost wants to merge 2 commits into
mainfrom
duration-struct
Closed

refactor: Use Duration dataclass#108
ghost wants to merge 2 commits into
mainfrom
duration-struct

Conversation

@ghost

@ghost ghost commented Nov 8, 2025

Copy link
Copy Markdown
  • Update Duration API to use from_seconds() builder method
  • Update all examples to use Duration API

PYTHON_LANGUAGE_SDK_BRANCH: use-duration

- Change Duration.seconds(5) to Duration.from_seconds(5)
- Aligns with Duration refactoring in main SDK
@ghost ghost requested review from wangyb-A and yaythomas as code owners November 8, 2025 22:51
@ghost ghost closed this Nov 8, 2025
@ghost ghost reopened this Nov 8, 2025
@ghost ghost closed this Nov 8, 2025
@ghost ghost reopened this Nov 8, 2025
- Replace context.wait(seconds=N) with context.wait(Duration.from_seconds(N))
- Replace CallbackConfig(timeout_seconds=N) with CallbackConfig(timeout=Duration.from_seconds(N))
- Replace WaitForCallbackConfig timeout_seconds/heartbeat_timeout_seconds with Duration objects
- Replace RetryStrategyConfig initial_delay_seconds/max_delay_seconds with Duration objects
- Add Duration import to all affected files
- Aligns with Duration refactoring in main SDK
@ghost ghost force-pushed the duration-struct branch from 9cd1957 to 0ada51c Compare November 8, 2025 22:59
@ghost ghost closed this Nov 8, 2025
@ghost ghost reopened this Nov 8, 2025
@ghost ghost closed this Nov 8, 2025
@ghost ghost reopened this Nov 8, 2025
@ghost ghost changed the title Use Duration dataclass refactor(testing): Use Duration dataclass Nov 8, 2025
@ghost ghost closed this Nov 8, 2025
@ghost ghost reopened this Nov 8, 2025
@ghost ghost changed the title refactor(testing): Use Duration dataclass refactor: Use Duration dataclass Nov 8, 2025
@ghost ghost closed this Nov 8, 2025
@ghost ghost reopened this Nov 8, 2025
@ghost ghost force-pushed the duration-struct branch from 30d0b16 to 0ada51c Compare November 8, 2025 23:38
@wangyb-A

wangyb-A commented Nov 9, 2025

Copy link
Copy Markdown
Contributor

oops I also refactored the tests (with some new tests) in #105

@ghost

ghost commented Nov 9, 2025

Copy link
Copy Markdown
Author

Okay let's close this one

@wangyb-A wangyb-A closed this Nov 10, 2025
@wangyb-A wangyb-A deleted the duration-struct branch November 18, 2025 16:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants