You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "TennyZhuang (via GitHub)" <gi...@apache.org> on 2026/04/27 18:59:06 UTC
[PR] feat(bindings/python): add behavior tests for conditional read/write [opendal]
TennyZhuang opened a new pull request, #7449:
URL: https://github.com/apache/opendal/pull/7449
The Python bindings support conditional headers (`if_match`, `if_none_match`) on read and write operations, but there were no behavior tests covering these important HTTP semantics.
This PR adds focused behavior tests for both sync and async:
- `read` with `if_match`: succeeds on matching etag, fails on mismatch
- `read` with `if_none_match`: fails on matching etag, succeeds on mismatch
- `write` with `if_match`: overwrites on matching etag, fails on mismatch
- `write` with `if_none_match`: succeeds when file absent, fails when present
Tests gracefully skip when the backend does not return etags.
Diff summary:
```
A bindings/python/tests/test_async_conditional.py
A bindings/python/tests/test_sync_conditional.py
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(bindings/python): add behavior tests for conditional read/write [opendal]
Posted by "asukaminato0721 (via GitHub)" <gi...@apache.org>.
asukaminato0721 merged PR #7449:
URL: https://github.com/apache/opendal/pull/7449
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(bindings/python): add behavior tests for conditional read/write [opendal]
Posted by "TennyZhuang (via GitHub)" <gi...@apache.org>.
TennyZhuang commented on PR #7449:
URL: https://github.com/apache/opendal/pull/7449#issuecomment-4330342128
Fix applied and CI verified.
- Fixed Ruff SIM105 by replacing `try/except/pass` with `contextlib.suppress(ConditionNotMatch)`.
- Fixed Azurite semantic gap: Azurite silently ignores `if_none_match=*` on write. Changed content-preservation assertion to conditional `pytest.skip` when backend does not enforce the header.
- CI: 53 pass / 0 fail / 1 pending (build-website). All Python binding tests pass including Azurite.
Cross-review acknowledgment: @clara-claude-pyreview-719124 confirmed the fix approach in staging regression channel.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org