Skip to content

feat: add CheckpointResult type for checkpoint() return value#11

Merged
sujitn merged 1 commit intomainfrom
feat/checkpoint-result
Feb 22, 2026
Merged

feat: add CheckpointResult type for checkpoint() return value#11
sujitn merged 1 commit intomainfrom
feat/checkpoint-result

Conversation

@sujitn
Copy link
Copy Markdown
Contributor

@sujitn sujitn commented Feb 22, 2026

Summary

  • Adds a new CheckpointResult frozen pyclass that wraps the checkpoint ID with checkpoint_id getter, __bool__, __int__, and __repr__ support
  • Changes Connection.checkpoint() to return CheckpointResult instead of int | None
  • Adds type stubs, exports, and deprecation note on the old CheckpointStatus dataclass
  • Adds 10 new tests covering disabled/enabled checkpointing, result properties, and after-close behavior

Test plan

  • cargo check and cargo clippy -- -D warnings pass clean
  • pytest tests/test_checkpoint.py -v — all 10 new tests pass
  • pytest tests/ -v — all 242 tests pass (no regressions)

- Add PyCheckpointResult frozen pyclass with checkpoint_id getter,
  __bool__, __int__, and __repr__ support
- Change Connection.checkpoint() to return CheckpointResult instead
  of int | None
- Add CheckpointResult to type stubs, exports, and __all__
- Add deprecation note to CheckpointStatus in types.py
- Add comprehensive test suite (10 tests) covering disabled/enabled
  checkpointing, result properties, and after-close behavior
@sujitn sujitn merged commit 215cde0 into main Feb 22, 2026
5 checks passed
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