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

refactor(python): Refactor functionality related to Series buffers #13291

Merged
merged 6 commits into from
Dec 29, 2023

Conversation

stinodego
Copy link
Member

@stinodego stinodego commented Dec 28, 2023

Ref #10718

No functional changes, no changes to the public API (it's all private stuff). Just some stuff I want refactored to more easily implement from_buffers.

Changes

  • Rename _get_ptr to _get_buffer_info, as it returns the pointer, offset, and length
  • Add _get_buffer as a (private) Series method - avoids excessive calls to wrap_s in other places
  • Add _from_buffer as a (private) Series classmethod for the same reason
  • Move functionality in the Rust bindings to the same module
  • Move tests to the same module
  • Add a BufferInfo helper struct on the Rust side.

@github-actions github-actions bot added internal An internal refactor or improvement python Related to Python Polars labels Dec 28, 2023
@stinodego stinodego marked this pull request as ready for review December 28, 2023 13:14
@stinodego stinodego merged commit b44adb9 into main Dec 29, 2023
23 checks passed
@stinodego stinodego deleted the ptr-refactor branch December 29, 2023 15:33
@c-peters c-peters added the accepted Ready for implementation label Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation internal An internal refactor or improvement python Related to Python Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants