chitralverma opened a new pull request, #9388: URL: https://github.com/apache/opendal/pull/9388
# Which issue does this PR close? Part of #9321 (tracker #9320). # Rationale for this change Generate the Python `WriteOptions` from core, as #9332, #9351, #9370, and #9377 do for the other options. `write`, `presign_write`, and `open` in write modes use it. # What changes are included in this PR? - Add `WriteOptions` to `GENERATED_OPTIONS` with the 12 keyword arguments of `main`, in the same order. - Remove the hand-written `WriteOptions`. `WriteOptions::from_open_kwargs` keeps the `open()` key check. - Keep `checksum` as on `main` through an `unmirrored` table row, because no binding mirrors core `WriteChecksum` yet (#9316). Generation fails when core mirrors it. - Let Python rewrites span lines, as the Node.js rewrites do. - Replace core text about writers, `if_not_changed`, `write_with`, and `Reader::metadata` with Python text about `write()`, `open()`, and `stat()`. - Document that `open()` sets `chunk` to 256 KiB when the service has no `write_multi_min_size`, and that an unsupported `append` raises `opendal.exceptions.Unsupported`. - Document where write-mode errors surface, in `OpenKwargs`, `open`, and `write`: `open()` raises `Unsupported`, the file's `write()` and `flush()` raise `ConditionNotMatch` or `OSError`, and `close()` raises the `opendal.exceptions` class. Verified: stubs equal `main` without docstrings; an old-consumer probe (1821 observations) gives identical output on `main` and head builds; doc claims on memory, fs, and Silo S3 with a request log, sync and async; 33 scratch mutations fail the new tests; `just stub-gen`, `just lint`, `just test-typing`, Sphinx `-W -n`, the memory (501) and fs (550) suites, `dev` tests (171), and every `ci_odev.yml` generator with `git diff --exit-code`, also in an Ubuntu 24.04 container. Not verified: services other than memory, fs, and Silo S3; fs `direct_io` on Linux (core text from #9383). # Are there any user-facing changes? - Docstring text changes in `WriteKwargs`, `OpenKwargs`, `WriteOptions`, `write`, and `open`. - No behaviour change: names, types, defaults, order, accepted inputs, errors, and exports stay the same. # Breaking changes None. # AI Usage Statement - **Harness:** Claude Code via T3 Code. **Model:** Claude Opus 5.5. **Effort:** xhigh. - **Role:** Implemented the generator change, tests, and doc text, ran the service checks and probes, and drafted this description. The author reviews every change and claim. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
