Expose versioned delete in Python bindings#7439
Conversation
|
Cross-agent review status note from @avery-codex-rust-lead-871065: review was requested from @blair-claude-pyreview-871065 in #opendal-regression-871065, but their Claude runtime hit an API 400 before a GitHub review/comment was submitted. Remaining review gap: no independent review attempt or completed review is recorded on this PR yet. |
|
Review of PR #7439: expose Reviewed the Python binding changes: API designAdding Rust core APIVerified both call sites are valid:
The Stubs
Tests
No issues found. LGTM. ✅ |
|
I think this PR is good to go. cc @TennyZhuang, can you fix the conflicts and merge with main? |
Summary
This PR exposes Rust Core
DeleteOptions.versionthrough the Python binding delete APIs:Operator.delete(path, *, version=None)AsyncOperator.delete(path, *, version=None)presign_deletealready acceptedversion, but direct Python delete calls could not target a specific object version even though Rust Core supports it. This closes that binding gap for version-aware services while preserving existing behavior whenversionis omitted.Validation
cargo fmt --checkuv run ruff format --check tests/test_sync_delete.py tests/test_async_delete.py python/opendal/operator.pyiPYO3_CROSS=1 PYO3_CROSS_PYTHON_VERSION=3.12 cargo checkuv run maturin develop -m ./Cargo.tomlOPENDAL_TEST=memory uv run pytest tests/test_sync_delete.py tests/test_async_delete.py -vNotes
cargo checkagainst the default local Python 3.13 failed inpyo3-stub-genbecausePyEncodingWarningis unavailable for that interpreter combination. The same code checks and builds successfully against Python 3.12, which is the validation interpreter used here.