Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(binding/python): allow setting append/buffer/more in write() call #3256

Merged
merged 11 commits into from
Oct 12, 2023

Conversation

jokester
Copy link
Contributor

Fixes #3242

This PR adds named parameters to python Operator.write() AsyncOperator.write() methods, to allow append/buffer/content_type/more to be set.

@jokester jokester marked this pull request as ready for review October 10, 2023 14:45
Copy link
Member

@messense messense left a comment

Choose a reason for hiding this comment

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

Please format the .pyi file with black.

bindings/python/src/lib.rs Outdated Show resolved Hide resolved
@Xuanwo
Copy link
Member

Xuanwo commented Oct 12, 2023

This PR mostly LGTM. Needs @messense to confirm the pyi changes.

Copy link
Member

@messense messense left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

bindings/python/python/opendal/__init__.pyi Show resolved Hide resolved
Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@Xuanwo Xuanwo merged commit 044cf64 into apache:main Oct 12, 2023
29 checks passed
@jokester jokester deleted the python-binding-expose-more branch October 12, 2023 08:36
Zheaoli pushed a commit to Zheaoli/opendal that referenced this pull request Oct 12, 2023
apache#3256)

* binding/python: add new parameters to stub methods

* add parameters to implementations

* run cargo fmt

* make clippy happy

* run black on py stubs

* Operator: read and apply kwargs in PyDict

* refactor kwargs recognition to struct WriteOptions

* touch test to see if WriteOptions worked

* Revert "touch test to see if WriteOptions worked"

This reverts commit bb38127.

* remove WriteOptions and reuse od::OpWrite

* rewrite build_opwrite()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Capability to set contentType not available in python binding
3 participants