chitralverma opened a new pull request, #9398: URL: https://github.com/apache/opendal/pull/9398
# Which issue does this PR close? Part of #9321 (tracker #9320). # Rationale for this change Generate the Python `CopyOptions` from core, as #9332, #9351, #9370, #9377, and #9388 do for the other options. `copy` uses it. No new option is exposed. # What changes are included in this PR? - Add `CopyOptions` to `GENERATED_OPTIONS` with the one keyword argument of `main`, `if_not_exists`. Every other core field keeps its default. - Remove the hand-written `CopyOptions`. Only `RenameOptions` stays hand-written. - Take the `CopyKwargs` docs from core. Python reads core's "which error the copy returns is unspecified" as "which exception the copy raises is unspecified". Generation fails when core drops that text. - Clarify the `OpenKwargs` intro, as suggested on #9388: `open()` ignores an option of the other mode when its value is `None` and raises `TypeError` for any other value. In write modes, `open()` sets `chunk` to 256 KiB when the service has no `write_multi_min_size`. Sphinx publishes `OpenKwargs`, but not the `WriteKwargs.chunk` doc. - Add tests that pin the `copy` signatures, the `CopyOptions` surface and its full docs against `main`, and the 256 KiB value in `open()`. Verified: stubs equal `main` without docstrings; an old-consumer probe of `copy` (1100 observations on memory and fs, sync and async) gives identical output on `main` and head builds; doc claims on fs and Azurite, sync and async; 10 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 (177), and every `ci_odev.yml` generator with `git diff --exit-code`; stubs and suites also on Linux. Not verified: services other than memory, fs, and Azurite; a real `Conflict` from `copy`. # Are there any user-facing changes? - Docstring text changes in `CopyKwargs` and `OpenKwargs`. - No behaviour change: names, types, defaults, 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]
