chitralverma opened a new pull request, #9400: URL: https://github.com/apache/opendal/pull/9400
# Which issue does this PR close? Part of #9321 (tracker #9320). # Rationale for this change Generate the Python `RenameOptions` from core, as #9398 does for `CopyOptions`. `rename` uses it. It is the last hand-written Python options class. No new option is exposed. # What changes are included in this PR? - Add `RenameOptions` to `GENERATED_OPTIONS` with the one keyword argument of `main`, `if_not_exists`. - Remove the hand-written `RenameOptions`. `options.py` now comes from the generated classes only. - Remove `dev/src/generate/options.rs`, which parsed the hand-written classes. Move its `doc_lines` unchanged to `dev/src/generate/rustdoc.rs`, because the `Capability` and `Metadata` parsers use it. - Take the `RenameKwargs` docs from core. Python reads core's "which error the rename returns is unspecified" as "which exception the rename raises is unspecified". Generation fails when core drops that text. - Add tests that pin the `rename` signatures and the `RenameOptions` surface against `main`, the full `RenameOptions` docs against core, and the hand-written `rename` docstrings against the generated docs. Verified: an old-consumer probe of `rename` (619 observations on memory, fs, sqlite, and nginx WebDAV, sync and async, with and without `rename_with_if_not_exists`) gives identical output on `main` and head builds; doc claims on Linux fs, macOS fs, sqlite, and WebDAV; 13 scratch mutations fail the new tests; `just stub-gen`, `just lint`, `just test-typing`, Sphinx `-W -n`, the memory (501) and fs (550) suites on macOS and Linux, `dev` tests (182), and every `ci_odev.yml` generator with `git diff --exit-code`; stubs also on Linux. Not verified: services other than memory, fs, sqlite, and WebDAV. S3 and Azure Blob do not support `rename`, so Silo and Azurite cannot check these docs. # Are there any user-facing changes? - Docstring text changes in `RenameKwargs`. - 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]
