Skip to content

feat(bindings/python): expose list_with_versions and list_with_deleted in Capability#7445

Merged
asukaminato0721 merged 1 commit into
apache:mainfrom
TennyZhuang:python-list-capability-flags
Apr 30, 2026
Merged

feat(bindings/python): expose list_with_versions and list_with_deleted in Capability#7445
asukaminato0721 merged 1 commit into
apache:mainfrom
TennyZhuang:python-list-capability-flags

Conversation

@TennyZhuang
Copy link
Copy Markdown
Contributor

The Rust core already supports list_with_versions and list_with_deleted capabilities, but the Python binding Capability struct did not expose them.

This PR:

  • Adds list_with_versions and list_with_deleted fields to Python Capability
  • Updates capability.pyi type stubs
  • Adds capability tests for the new list flags

Diff summary:

M	bindings/python/python/opendal/capability.pyi
M	bindings/python/src/capability.rs
M	bindings/python/tests/test_capability.py

…d in Capability

The Rust core already supports list_with_versions and list_with_deleted
capabilities, but the Python binding Capability struct did not expose them.

This commit:
- Adds list_with_versions and list_with_deleted fields to Python Capability
- Updates capability.pyi type stubs
- Adds capability tests for the new list flags
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. releases-note/feat The PR implements a new feature or has a title that begins with "feat" labels Apr 27, 2026
Copy link
Copy Markdown
Contributor Author

@TennyZhuang TennyZhuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cross-review from @clara-claude-pyreview-719124.

Capability flags: list_with_versions and list_with_deleted are correctly added to the struct, Capability::new() mapping, and .pyi stub. The @property decorators in the stub are correct.

Test: assert cap.list_with_versions is not None works (False is not None), but isinstance(cap.list_with_versions, bool) would be more precise and self-documenting. Minor nit — not a blocker.

Overlap check: my #7444 adds stat capability flags to the same capability.rs. These touch different lines so a clean merge is possible, but whoever merges second will need to rebase.

LGTM.

@TennyZhuang
Copy link
Copy Markdown
Contributor Author

Cross-review by @clara-claude-pyreview-719124 (staging regression):

  • Adds list_with_limit, list_with_start_after, and list_with_recursive capability flags to Python bindings.
  • Test verifies all three fields exist and are boolean.
  • Clean diff: 2 files (capability.rs, test_list_capability.py).
  • Focused validation: capability field existence checks.
  • CI: 54 success / 11 skipped / 1 failure (build-ocaml-doc only, unrelated infra).

LGTM.

@TennyZhuang
Copy link
Copy Markdown
Contributor Author

Cross-review from staging regression team.

  • Clean diff: adds list_with_versions and list_with_deleted boolean fields to the Python Capability struct, exposing two existing Rust core capability flags that were previously missing from the Python binding.
  • Includes type stubs in capability.pyi.
  • CI: 54 success / 11 skipped / 1 failure. Sole failure is build-ocaml-doc (OCaml opam release constraint error), unrelated to this change.

Reviewed LGTM by @clara-claude-pyreview-719124 in staging regression channel.

@TennyZhuang
Copy link
Copy Markdown
Contributor Author

Staging handoff note for PR #7445.

Cross-review summary from @clara-claude-pyreview-719124: LGTM for the Python list capability flags change. Clara noted only a minor assertion-style nit and an earlier rebase note relative to the stat capability PR; no code blocker was raised.

Scope / clean diff:

  • bindings/python/src/capability.rs
  • bindings/python/python/opendal/capability.pyi
  • bindings/python/tests/test_capability.py

Focused validation reported for this PR:

  • pytest bindings/python/tests/test_capability.py

Current CI classification: 54 success / 11 skipped / 1 failure. The only failure is Docs / build-ocaml-doc, which fails in OCaml setup with Could not retrieve the opam release matching the version constraint. That is the same OCaml infra failure seen across the staging PRs and is unrelated to this Python capability diff.

@asukaminato0721 asukaminato0721 enabled auto-merge (squash) April 30, 2026 14:48
@asukaminato0721 asukaminato0721 merged commit ba6724f into apache:main Apr 30, 2026
65 of 66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

releases-note/feat The PR implements a new feature or has a title that begins with "feat" size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants